You should add "charset=utf8" to your connection string. There are a
couple of things that you should realize about the connector.
1. If you don't specify a charset, then it takes the default charset
currently in effect for your server (in your case that would be latin1)
2. MySQL sends back (from 4.1 on) the charset info for each field.
(this is why the results are correct when inserted using another method)
By setting your charset to utf8, the outgoing queries will be handled as
utf8 and your Russian text should be ok (assuming utf8 handles all the
Russian characters you want)
-Reggie
Andr?s Villanueva wrote:
> Well, I'm not specifying the charset on the connection if that's what
> you want to know...
> This is it:
> server={0};user id={1}; password={2}; database={3};
> pooling=false
> I was wondering what was the correct charset for my case, since I'm
> using mostly latin1, will using utf affect the data for all the other
> columns?
> The other question would be how to specify it in the connection
> string... I believe its "charset=xxx" right?
>
> Thanks
> Andr?s Villanueva
>
> Reggie Burnett wrote:
>
>> What connection string are you using?
>>
>> Andr?s Villanueva wrote:
>>
>>
>>
>>> Hi!
>>> I have a problem when adding/updating a table that has a column with
>>> UTF-8 collation.
>>>
>>> The situation:
>>> All my tables are in latin1, but a few of them, need to store data
>>> in for different languages.
>>> In all those tables I have a column for english, french, russian and
>>> spanish. As I said before, all collumns and all tables are set to use
>>> latin1 as default, but the columns for the russian language where set
>>> to use a utf8 collation.
>>>
>>> The problem:
>>> When I copy/paste into the query browser, the data is stored
>>> correctly, and the .net datagrids show the data correctly as well.
>>> The problem is that whenever I update / insert new data from the
>>> app, the russian values aren't recognized, resulting in corrupted data.
>>>
>>> The question:
>>> What should I do? :D
>>>
>>> Any help will be much appreciated.
>>>
>>> Thanks
>>> Andr?s Villanueva
>>>
>>>
>>>
>>
>>
>>
>>
>
>
--
Reggie Burnett, Software Developer
MySQL Inc,
http://www.mysql.comMySQL Users Conference (Santa Clara CA, 18-21 April 2005)
Early registration until February 28:
http://www.mysqluc.com/--
MySQL on .NET Mailing List
For list archives:
http://lists.mysql.com/dotnetTo unsubscribe:
http://lists.mysql.com/dotnet?unsub=lists@...