[ic] UTF-8 in MySQL

Stefan Hornburg racke at linuxia.de
Tue Mar 7 14:55:07 EST 2006

Mike Heins wrote:
> Quoting Jon Jensen (jon at endpoint.com):
>>On Tue, 7 Mar 2006, Elver Loho wrote:
>>>To get utf8 from MySQL's utf8 fields, *you have to tell MySQL that you
>>>want it to 'convert' things to UTF-8 for you* This can be done using:
>>>1) set names utf8
>>>2) set character set utf8
>>>Interchange will have to send either of those above commands before
>>>executing 'select * from locale' in order to get proper utf8 strings
>>>rather than the question marks it is getting now.
>>>What I need documentation on is how to tell Interchange to send 'set
>>>names utf8' (or the other string) to MySQL before selecting anything
>>>from there. And then it will have to either internally convert some
>>>fields to latin1 OR it can use 'select cast' which can take care of
>>>that as well.
>>I don't necessarily think doing this is the best solution for you, but 
>>present it as something to consider:
>>Once upon a time I needed a certain session variable set in PostgreSQL 
>>before a query was run (maybe timezone? I don't recall now), and added a 
>>PREQUERY option to Interchange's databases, allowing something like this 
>>in catalog.cfg:
>>In the end, I decided to change the user's default settings so that the 
>>timezone was like that automatically, and I never committed the change to 
>>Interchange CVS. I've attached the patch -- it was written a long time 
>>ago, so I hope that's everything you need to try it. If you find it 
>>useful, let me know and we'll see about getting it in the core.
> You would probably have to put this on a separate DSN, as I would think
> it would affect all tables for the handle.

And I would probably have it die on errors :-).


More information about the interchange-users mailing list