Because MySQL 5.1 does not support 4 byte UTF-8 sequences, I need to replace/drop the 4 byte sequences in these strings.
I\'m looking a clean way to replace these charac
Another simple solution is to use regular expression [^\u0000-\uFFFF]. For example in java:
[^\u0000-\uFFFF]
text.replaceAll("[^\\u0000-\\uFFFF]", "\uFFFD");