String Replace "Issue"


#1

Only seems to affect multibyte unicode.

String sourceString(String::fromUTF8("\u3067\u306E")); // de no in Japanese
DBG(sourceString); // Make sure its output correctly!
DBG(sourceString.replace(String::fromUTF8("\u306E"),"Justin",false)); // Replace correctly I get de Justin
DBG(sourceString.replace(String::fromUTF8("\u306E"),"Justin",true)); // I get Justin Justin

Here is the output

Strange huh?


#2

Strange indeed! I think I’d better create a new unit test for that and do some debugging! Thanks!