The current answer is that Emoji support has not been added to the database, causing the nicknames with Emoji expressions obtained from WeChat to be garbled. There are two solutions:
1. Add Emoji support to the database, there is a solution on SO
2. Filter out the garbled characters obtained when the user registers, leaving only normal characters. I used the following filtering method. The code is relatively simple, but it can be used normally:
I have never written an iOS program. My personal opinion is that WeChat also uses characters to store this kind of nicknames with emoticons, and may just happen to be this character When it comes to the iOS system, it becomes another emoticon.
Wait for the master.
The current answer is that Emoji support has not been added to the database, causing the nicknames with Emoji expressions obtained from WeChat to be garbled. There are two solutions:
1. Add Emoji support to the database, there is a solution on SO
2. Filter out the garbled characters obtained when the user registers, leaving only normal characters. I used the following filtering method. The code is relatively simple, but it can be used normally:
I have never written an iOS program. My personal opinion is that WeChat also uses characters to store this kind of nicknames with emoticons, and may just happen to be this character When it comes to the iOS system, it becomes another emoticon.
Wait for the master.
Check whether the encoding of the string is normal, or there may be a problem with the string format.