Page 1 of 1

CEGUI::String <-> MySQL (ucs2_unicode_ci)

Posted: Sun Nov 08, 2009 12:46
by yamashi
Hello,

I currently have a database encoded in "ucs2_unicode_ci" and I would like to know how I can convert the data received from the SQL database to a CEGUI::String ?
Note : When I receive the data from the database it's a byte array.

How does the CEGUI::String know which encoding it's supposed to be using ?
Is the CEGUI::String implementation language independant ? (does it work the same way on an english computer and a japenese computer ?)

Thanks !

Re: CEGUI::String <-> MySQL (ucs2_unicode_ci)

Posted: Sun Nov 08, 2009 15:51
by Jabberwocky
I don't know the answer, but if you search for "unicode" in the CEGUI forums, you'll get a huge number of threads discussing related issues. Maybe one of them will help you.

Re: CEGUI::String <-> MySQL (ucs2_unicode_ci)

Posted: Mon Nov 09, 2009 09:08
by QuestOfDreams
If I remember correctly the CEGUI String class only handles utf8 and utf32 encoded string correctly. ucs 2 is similar to utf16 which is not supported. You'll have to do the conversion yourself...