[ic] UTF-8 in MySQL
Elver Loho
elver.loho at gmail.com
Tue Mar 7 09:11:12 EST 2006
Hiya!
We have a problem here implementing i18n support for our webshop. That
is, right now, things 'work' in that we have a MySQL database with all
our products in it, including some product names in Russian.
(Cyrillic, UTF-8 fields.)
However, on the MySQL side, those database fields are currently set as 'latin1'.
That is, the multi-byte UTF-8 chars are stored in a text field made
for single-byte chars. So far it works.
Now we're trying to go UTF-8 on the database side. That is, one of the
tables (system.locale, for translations) has a 'rus' row where text is
stored as utf-8.
Connecting to the table from the command line with a terminal that
supports utf-8 yields the following two situations:
1) after 'set names utf8', the fields are returned as readable utf-8 characters.
2) without setting names or with setting 'set names latin1', the
fields are returned as question marks.
The question therefore is: how can we tell interchange to treat the
system.locale.rus field as utf-8 multi-byte text?
I mean, something like 'set names utf8' or 'set character set utf8'
before a query should suffice. How to tell interchange to insert that
before a query on system.locale?
Elver
More information about the interchange-users
mailing list