Receiving Chinese blocks of texts in the Messaging app


Question

My wife is getting some weird text messages as replies in middle of conversations with her friends. The messages are blocks of Chinese characters. She gets these in the stock messaging app from friends that use Samsung phones and iPhones. She is using a Nexus 5X on AT&T. (N.B. Other users have asked the same question about the Samsung Galaxy S7, so it's not a phone-specific issue.)



Here is a screencap from today from an iPhone user, and translating the text does not make sense (though I did image translation): :



iphone response
what does this even mean



(Click to see the image in full size)






Here is one from a Samsung phone and from their end:



again with the chinese
from the samsung's end



(Click to see the image in full size)



Does anyone know why this is happening? Is it some weird thing when someone with a weird texting app replies with some emoji/GIF/image?


Answer

Cause


It's likely caused by either/both character encoding incompatibility and/or wrong character encoding, resulting in mojibake (garbled text):



  1. Character encoding incompatibility

    SMS, or text message, in general supports either text-only (e.g. GSM 03.38), or Unicode (e.g. UTF-8, UTF-16, UCS-2). Emoji, a character that resembles an image (not to be confused with emoticon, "a pictorial representation of a facial expression using punctuation marks, numbers and letters"), is supported in Unicode (UTF-16), but not in GSM 03.38.



  2. Wrong character encoding issue

    For some reasons, the original character encoding is wrongly interpreted somewhere (e.g. by app, or by text provider), resulting in different character encoding. While in some cases it doesn't affect the text, other cases may result in totally garbled text (refer to Microsoft Windows "Bush hid the facts" bug).




In this case, it's likely that one of the encoding that is used in SMS, GSM. 03.38, which uses 7-bit per character, is interpreted as UTF-16, which uses 16-bit per character due to emoji.


Solution



  • Recipients

    Try changing the messaging app. If it doesn't fix the issue, then it's probably caused by the text provider itself. However, you can still try to recover the text (e.g. using online service such as http://string-functions.com/encodedecode.aspx): set encoding to UTF-16 and decoding to UTF-8.



  • Senders

    Avoid emoji at all, or make the messaging apps send it as text-only (e.g. in Google Messenger, there's Simple characters only in Advanced settings to convert special characters in SMS messages when sending it)






Further reading:



Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes