Send an SMS (UTF-16) with an unknown character replaced by a "replacement character" in Android

I have a problem sending SMS messages. I created a line with characters like "\ uFDE8" (it is 65000). When I convert it back, I get 65,000. It looks fine.

But when I send an SMS with this line and receive a message, I have this character replaced with "\ uFFFD" (65533). This symbol is called the "replacement symbol".

Why has my character changed?

// edit My solution is to convert each char string to a 7-bit one and then send it. You should notice that the gms alphabet is different from ascii (some characters need to be replaced with another). Good luck

+6
source share
1 answer

According to the Unicode table, U+FDE8 not a valid code.

As you would expect, any invalid character is replaced by your SMS provider system with U+FFFD REPLACEMENT CHARACTER , which in itself is a valid Unicode character, but exists only to show that the original cannot be correctly represented.

+5
source

All Articles