Skip to content

Instantly share code, notes, and snippets.

@lstrojny
Created August 20, 2012 21:30
Show Gist options
  • Save lstrojny/3408088 to your computer and use it in GitHub Desktop.
Save lstrojny/3408088 to your computer and use it in GitHub Desktop.
--TEST--
Multibyte characters shouldn't be split by soft line break added by quoted_printable_encode - 4 byte character test
--INI--
default_charset=ISO-8859-1
--FILE--
<?php
var_dump(explode("\r\n", quoted_printable_encode(str_repeat("a", 74) . "\xf0\x9f\x84\x90")));
?>
==DONE==
--EXPECT--
array(2) {
[0]=>
string(75) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa="
[1]=>
string(12) "=F0=9F=84=90"
}
==DONE==
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment