Use CharsetEncoder: http://developer.android.com/reference/java/nio/charset/CharsetEncoder.html
Specify onUnmappableCharacter(REPLACE) and set your own replacement with replaceWith()
http://developer.android.com/reference/java/nio/charset/CharsetEncoder.html#onUnmappableCharacter(java.nio.charset.CodingErrorAction) <http://developer.android.com/reference/java/nio/charset/CharsetEncoder.html#onUnmappableCharacter%28java.nio.charset.CodingErrorAction%29>
http://developer.android.com/reference/java/nio/charset/CharsetEncoder.html#replaceWith(byte[]) <http://developer.android.com/reference/java/nio/charset/CharsetEncoder.html#replaceWith%28byte[]%29>
-- Kostya 11.09.2011 7:37, bob пишет:
How do I tell Java what to replace a special UTF-8 character with when converting to US-ASCII?
-- Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en