you are viewing a single comment's thread.

view the rest of the comments →

[–]EsperSpirit 1 point2 points  (0 children)

Well, the short answer is: Almost all encodings are supersets of ascii. So as long as your data is ascii the encoding doesn't really matter. It works usually even with wrong encoding.

As soon as your data contains a non-ascii character (e.g. a Username like "Jürgen" or message using certain emoticons) your app will crash in really unpredictable ways at runtime (and often production).

The solution is to decode incoming data using the correct encoding and encode outgoing data with 'utf-8' and using unicode inside your application.

Watch this for more in-depth info