I'd like to store arabic names in the string using arabic letters and english chars together. Something like:
/1/n/ﺶﻴﺷ/s/ﺶﻴﺷ/c/ﺶﻴﺷ/sc/ﺶﻴﺷ
Alas the database doesn't recognize them and store them using other keywords.
Is it possible to use arabic characters somehow?
For example I try to create a user named:
/1/n/ﺶﻴﺷ/s/ﺶﻴﺷ/c/ﺶﻴﺷ/sc/ﺶﻴﺷ
Then I try to check if this user exists, but it gives back false.
If I check into the database I find users strange keycodes like: /1/n/ﺶﻴﺷ/s/ﺶﻴﺷ/c/ﺶﻴﺷ/sc/ﺶ
It seems like it truncate the last chars of the word. It should become something like:
/1/n/ﺶﻴﺷ/s/ﺶﻴﺷ/c/ﺶﻴﺷ/sc/ﺶﻴﺷ
I even tried to add it manually on the database but it gives me back:
"Warning: #1265 Data truncated for column 'Username' at row 1"
Thank you very much.
Since the collation of the database and tables is set to utf8_general_ci, it should just work. In fact I tried to assign ﺦﺴﺧ to a custom data and it was correctly saved and displayed in Unity. I suspect that your issue on Username could be related to the byte length of the unicode string, if it's getting truncated then most likely it's exceeding the bytes of varchar(45), in this case you could try to increase the length of Username in the table CB_Account (for example try to set it to 100 or 255).
PS: most times if you store a unicode or utf8 character that is not alphanumerical into MySQL, it'll appear with those ascii characters when you read it from MySQL Workbench or other tools, but try to set and retrieve it in a custom data with Unity and you'll see it correctly. It has probably something to do with the way PHP and MySQL manages the UTF8 and Unicode characters.
FRANCESCO CROCETTI @ SKARED CREATIONS