6

I have a problem with sending SMS messages. I created a string with characters like "\uFDE8" (it's 65000). When I convert it back, I get 65000. It looks OK.

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

Why was my character replaced?

//edit My solution is to convert each char of string to 7-bit and then send it. You must notice that gms alphabet is different from ascii (some chars needs to be replace to another). Good luck!

hevy
  • 91
  • 1
  • 8

1 Answers1

5

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

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

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
mvp
  • 111,019
  • 13
  • 122
  • 148
  • The code point is valid, but unassigned, i.e. no character is assigned to it (so far). – Jukka K. Korpela Jan 19 '13 at 10:23
  • 2
    According to Unicode 6.1 [chart](http://www.unicode.org/charts/PDF/UFB50.pdf), `U+FDE8` is non-character. *These codes are permitted for process-internal uses, but are not permitted for interchange*. – mvp Jan 19 '13 at 10:46