samedi 25 juin 2016

C++ utf16 Unicode escape sequence

So I have multiple strings that I need to send to my mysql database. But unfortunately some of characters are encoded in utf16. I already have made the column where the string are going in utf16.

Take this string for example:"StatTrak\u2122 AK-47 | Aquamarine Revenge (Factory New)"

What I want in my database:"StatTrak™ AK-47 | Aquamarine Revenge (Factory New)"

I do not only have a trademark symbol I need to send to my database. I also have others like: \u2605 (★) , \u58f1 (壱), ...

So my question is: What do I need to do to get this in my database ?

Thanks in advance for any help.

(PS i am on ubuntu using c++11)

Aucun commentaire:

Enregistrer un commentaire