UTF Problems

View: New views
14 Messages — Rating Filter:   Alert me  

UTF Problems

by Andrés Villanueva :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...


Re: UTF Problems

by Reggie Burnett-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.com

MySQL 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/dotnet
To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...


Re: UTF Problems

by Andrés Villanueva :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
>>
>>
>>    
>>
>
>  
>


--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...


Re: UTF Problems

by Reggie Burnett-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.com

MySQL 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/dotnet
To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...


Re: UTF Problems

by tomasofen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I have the same problem...

I have a MySQL database where i can save Rusian characters using PHPMyAdmin or "MySQL Query Browser", and i can see the characters all right.

When i try to save or read russian characters in the MySQL database using my ASP .NET web application, the process fails. The data saved in MySQL results in characters like this "? ? ? ? ?".

The fact is that i test my ASP .NET application with a microssoft access database, and it works ok, saving and reading the russian characters ok.

I install MySQL allowing multilanguage, so it is supposed to use utf8. I check the table deffinition where i want to save the data, and it is of course as utf8.

I supposed it could be sommething in the connection string like that you explain in here, but i try to insert the "charset=utf8" in the connection string and it doesn't work neither. The current connection string i'm using is this:

"DRIVER={MySQL ODBC 3.51 Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;OPTION=3;charset=utf8"

I tried some changes to this string, like adding "pooling", or delete "option", but nothing works...

I'm near to desesperation, becouse i don't know what else can i try :(

Please, any idea there??

Thanks in advance,

Tomas

Re: UTF Problems

by Ahmet ÜK :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

is your website and document coding in UTF-8?


2007/5/10, tomasofen <tomasofen@...>:

>
>
> Hi
>
> I have the same problem...
>
> I have a MySQL database where i can save Rusian characters using
> PHPMyAdmin
> or "MySQL Query Browser", and i can see the characters all right.
>
> When i try to save or read russian characters in the MySQL database using
> my
> ASP .NET web application, the process fails. The data saved in MySQL
> results
> in characters like this "? ? ? ? ?".
>
> The fact is that i test my ASP .NET application with a microssoft access
> database, and it works ok, saving and reading the russian characters ok.
>
> I install MySQL allowing multilanguage, so it is supposed to use utf8. I
> check the table deffinition where i want to save the data, and it is of
> course as utf8.
>
> I supposed it could be sommething in the connection string like that you
> explain in here, but i try to insert the "charset=utf8" in the connection
> string and it doesn't work neither. The current connection string i'm
> using
> is this:
>
> "DRIVER={MySQL ODBC 3.51
>
> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;OPTION=3;charset=utf8"
>
> I tried some changes to this string, like adding "pooling", or delete
> "option", but nothing works...
>
> I'm near to desesperation, becouse i don't know what else can i try :(
>
> Please, any idea there??
>
> Thanks in advance,
>
> Tomas
> --
> View this message in context:
> http://www.nabble.com/UTF-Problems-tf1225.html#a10412379
> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>
>
> --
> MySQL on .NET Mailing List
> For list archives: http://lists.mysql.com/dotnet
> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=ahmet34@...
>
>

Re: UTF Problems

by tomasofen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes

I have in the doccument the following meta:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

And when you write russian text in a textbox it looks ok. And also the program works ok with a Microsoft Access Database, so i suppose it is correctly encoded in UTF8...


Ahmet ÜK wrote:
is your website and document coding in UTF-8?


2007/5/10, tomasofen <tomasofen@yahoo.es>:
>
>
> Hi
>
> I have the same problem...
>
> I have a MySQL database where i can save Rusian characters using
> PHPMyAdmin
> or "MySQL Query Browser", and i can see the characters all right.
>
> When i try to save or read russian characters in the MySQL database using
> my
> ASP .NET web application, the process fails. The data saved in MySQL
> results
> in characters like this "? ? ? ? ?".
>
> The fact is that i test my ASP .NET application with a microssoft access
> database, and it works ok, saving and reading the russian characters ok.
>
> I install MySQL allowing multilanguage, so it is supposed to use utf8. I
> check the table deffinition where i want to save the data, and it is of
> course as utf8.
>
> I supposed it could be sommething in the connection string like that you
> explain in here, but i try to insert the "charset=utf8" in the connection
> string and it doesn't work neither. The current connection string i'm
> using
> is this:
>
> "DRIVER={MySQL ODBC 3.51
>
> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;OPTION=3;charset=utf8"
>
> I tried some changes to this string, like adding "pooling", or delete
> "option", but nothing works...
>
> I'm near to desesperation, becouse i don't know what else can i try :(
>
> Please, any idea there??
>
> Thanks in advance,
>
> Tomas
> --
> View this message in context:
> http://www.nabble.com/UTF-Problems-tf1225.html#a10412379
> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>
>
> --
> MySQL on .NET Mailing List
> For list archives: http://lists.mysql.com/dotnet
> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=ahmet34@gmail.com
>
>

Re: UTF Problems

by Jorge Bastos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What about your connection string, do you have?
"character set=utf8"





----- Original Message -----
From: "tomasofen" <tomasofen@...>
To: <dotnet@...>
Sent: Thursday, May 10, 2007 1:39 PM
Subject: Re: UTF Problems



Yes

I have in the doccument the following meta:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

And when you write russian text in a textbox it looks ok. And also the
program works ok with a Microsoft Access Database, so i suppose it is
correctly encoded in UTF8...



Ahmet ÜK wrote:

>
> is your website and document coding in UTF-8?
>
>
> 2007/5/10, tomasofen <tomasofen@...>:
>>
>>
>> Hi
>>
>> I have the same problem...
>>
>> I have a MySQL database where i can save Rusian characters using
>> PHPMyAdmin
>> or "MySQL Query Browser", and i can see the characters all right.
>>
>> When i try to save or read russian characters in the MySQL database using
>> my
>> ASP .NET web application, the process fails. The data saved in MySQL
>> results
>> in characters like this "? ? ? ? ?".
>>
>> The fact is that i test my ASP .NET application with a microssoft access
>> database, and it works ok, saving and reading the russian characters ok.
>>
>> I install MySQL allowing multilanguage, so it is supposed to use utf8. I
>> check the table deffinition where i want to save the data, and it is of
>> course as utf8.
>>
>> I supposed it could be sommething in the connection string like that you
>> explain in here, but i try to insert the "charset=utf8" in the connection
>> string and it doesn't work neither. The current connection string i'm
>> using
>> is this:
>>
>> "DRIVER={MySQL ODBC 3.51
>>
>> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;OPTION=3;charset=utf8"
>>
>> I tried some changes to this string, like adding "pooling", or delete
>> "option", but nothing works...
>>
>> I'm near to desesperation, becouse i don't know what else can i try :(
>>
>> Please, any idea there??
>>
>> Thanks in advance,
>>
>> Tomas
>> --
>> View this message in context:
>> http://www.nabble.com/UTF-Problems-tf1225.html#a10412379
>> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>>
>>
>> --
>> MySQL on .NET Mailing List
>> For list archives: http://lists.mysql.com/dotnet
>> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=ahmet34@...
>>
>>
>
>

--
View this message in context:
http://www.nabble.com/UTF-Problems-tf1225.html#a10412558
Sent from the MySQL - .NET mailing list archive at Nabble.com.


--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:
http://lists.mysql.com/dotnet?unsub=mysql.jorge@...



--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...


Re: UTF Problems

by tomasofen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I had in my connection string "charset=utf8". I changed it for this one you tell, "character set=utf8", but it doesn't work...

This is at this moment my connection string:

DRIVER={MySQL ODBC 3.51 Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;character set=utf8;pooling=false"



Jorge Bastos wrote:
What about your connection string, do you have?
"character set=utf8"





----- Original Message -----
From: "tomasofen" <tomasofen@yahoo.es>
To: <dotnet@lists.mysql.com>
Sent: Thursday, May 10, 2007 1:39 PM
Subject: Re: UTF Problems



Yes

I have in the doccument the following meta:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

And when you write russian text in a textbox it looks ok. And also the
program works ok with a Microsoft Access Database, so i suppose it is
correctly encoded in UTF8...



Ahmet ÜK wrote:
>
> is your website and document coding in UTF-8?
>
>
> 2007/5/10, tomasofen <tomasofen@yahoo.es>:
>>
>>
>> Hi
>>
>> I have the same problem...
>>
>> I have a MySQL database where i can save Rusian characters using
>> PHPMyAdmin
>> or "MySQL Query Browser", and i can see the characters all right.
>>
>> When i try to save or read russian characters in the MySQL database using
>> my
>> ASP .NET web application, the process fails. The data saved in MySQL
>> results
>> in characters like this "? ? ? ? ?".
>>
>> The fact is that i test my ASP .NET application with a microssoft access
>> database, and it works ok, saving and reading the russian characters ok.
>>
>> I install MySQL allowing multilanguage, so it is supposed to use utf8. I
>> check the table deffinition where i want to save the data, and it is of
>> course as utf8.
>>
>> I supposed it could be sommething in the connection string like that you
>> explain in here, but i try to insert the "charset=utf8" in the connection
>> string and it doesn't work neither. The current connection string i'm
>> using
>> is this:
>>
>> "DRIVER={MySQL ODBC 3.51
>>
>> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;OPTION=3;charset=utf8"
>>
>> I tried some changes to this string, like adding "pooling", or delete
>> "option", but nothing works...
>>
>> I'm near to desesperation, becouse i don't know what else can i try :(
>>
>> Please, any idea there??
>>
>> Thanks in advance,
>>
>> Tomas
>> --
>> View this message in context:
>> http://www.nabble.com/UTF-Problems-tf1225.html#a10412379
>> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>>
>>
>> --
>> MySQL on .NET Mailing List
>> For list archives: http://lists.mysql.com/dotnet
>> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=ahmet34@gmail.com
>>
>>
>
>

--
View this message in context:
http://www.nabble.com/UTF-Problems-tf1225.html#a10412558
Sent from the MySQL - .NET mailing list archive at Nabble.com.


--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:
http://lists.mysql.com/dotnet?unsub=mysql.jorge@decimal.pt



--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@nabble.com

Re: UTF Problems

by Jorge Bastos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ah!

Tomas, you're not using the MySQL ADO.NET driver!
You're uding the MySQL ODBC Driver, diferent things.


DRIVER={MySQL ODBC 3.51
Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;character
set=utf8;pooling=false"



----- Original Message -----
From: "tomasofen" <tomasofen@...>
To: <dotnet@...>
Sent: Thursday, May 10, 2007 2:02 PM
Subject: Re: UTF Problems



I had in my connection string "charset=utf8". I changed it for this one you
tell, "character set=utf8", but it doesn't work...

This is at this moment my connection string:

DRIVER={MySQL ODBC 3.51
Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;character
set=utf8;pooling=false"




Jorge Bastos wrote:

>
> What about your connection string, do you have?
> "character set=utf8"
>
>
>
>
>
> ----- Original Message -----
> From: "tomasofen" <tomasofen@...>
> To: <dotnet@...>
> Sent: Thursday, May 10, 2007 1:39 PM
> Subject: Re: UTF Problems
>
>
>
> Yes
>
> I have in the doccument the following meta:
>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
>
> And when you write russian text in a textbox it looks ok. And also the
> program works ok with a Microsoft Access Database, so i suppose it is
> correctly encoded in UTF8...
>
>
>
> Ahmet ÜK wrote:
>>
>> is your website and document coding in UTF-8?
>>
>>
>> 2007/5/10, tomasofen <tomasofen@...>:
>>>
>>>
>>> Hi
>>>
>>> I have the same problem...
>>>
>>> I have a MySQL database where i can save Rusian characters using
>>> PHPMyAdmin
>>> or "MySQL Query Browser", and i can see the characters all right.
>>>
>>> When i try to save or read russian characters in the MySQL database
>>> using
>>> my
>>> ASP .NET web application, the process fails. The data saved in MySQL
>>> results
>>> in characters like this "? ? ? ? ?".
>>>
>>> The fact is that i test my ASP .NET application with a microssoft access
>>> database, and it works ok, saving and reading the russian characters ok.
>>>
>>> I install MySQL allowing multilanguage, so it is supposed to use utf8. I
>>> check the table deffinition where i want to save the data, and it is of
>>> course as utf8.
>>>
>>> I supposed it could be sommething in the connection string like that you
>>> explain in here, but i try to insert the "charset=utf8" in the
>>> connection
>>> string and it doesn't work neither. The current connection string i'm
>>> using
>>> is this:
>>>
>>> "DRIVER={MySQL ODBC 3.51
>>>
>>> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;OPTION=3;charset=utf8"
>>>
>>> I tried some changes to this string, like adding "pooling", or delete
>>> "option", but nothing works...
>>>
>>> I'm near to desesperation, becouse i don't know what else can i try :(
>>>
>>> Please, any idea there??
>>>
>>> Thanks in advance,
>>>
>>> Tomas
>>> --
>>> View this message in context:
>>> http://www.nabble.com/UTF-Problems-tf1225.html#a10412379
>>> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>>>
>>>
>>> --
>>> MySQL on .NET Mailing List
>>> For list archives: http://lists.mysql.com/dotnet
>>> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=ahmet34@...
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/UTF-Problems-tf1225.html#a10412558
> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>
>
> --
> MySQL on .NET Mailing List
> For list archives: http://lists.mysql.com/dotnet
> To unsubscribe:
> http://lists.mysql.com/dotnet?unsub=mysql.jorge@...
>
>
>
> --
> MySQL on .NET Mailing List
> For list archives: http://lists.mysql.com/dotnet
> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...
>
>
>

--
View this message in context:
http://www.nabble.com/UTF-Problems-tf1225.html#a10412855
Sent from the MySQL - .NET mailing list archive at Nabble.com.


--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:
http://lists.mysql.com/dotnet?unsub=mysql.jorge@...



--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...


Re: UTF Problems

by tomasofen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ah, ok

The application is very big, and it's right it uses connections with odbc. Dued to it's size i can't think in chage it to ADO .NET at this moment...

Is there any problem with this using ODBC? Or perhaps this is not the right thread to ask about it?

Tomás


Jorge Bastos wrote:
Ah!

Tomas, you're not using the MySQL ADO.NET driver!
You're uding the MySQL ODBC Driver, diferent things.


DRIVER={MySQL ODBC 3.51
Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;character
set=utf8;pooling=false"



----- Original Message -----
From: "tomasofen" <tomasofen@yahoo.es>
To: <dotnet@lists.mysql.com>
Sent: Thursday, May 10, 2007 2:02 PM
Subject: Re: UTF Problems



I had in my connection string "charset=utf8". I changed it for this one you
tell, "character set=utf8", but it doesn't work...

This is at this moment my connection string:

DRIVER={MySQL ODBC 3.51
Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;character
set=utf8;pooling=false"




Jorge Bastos wrote:
>
> What about your connection string, do you have?
> "character set=utf8"
>
>
>
>
>
> ----- Original Message -----
> From: "tomasofen" <tomasofen@yahoo.es>
> To: <dotnet@lists.mysql.com>
> Sent: Thursday, May 10, 2007 1:39 PM
> Subject: Re: UTF Problems
>
>
>
> Yes
>
> I have in the doccument the following meta:
>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
>
> And when you write russian text in a textbox it looks ok. And also the
> program works ok with a Microsoft Access Database, so i suppose it is
> correctly encoded in UTF8...
>
>
>
> Ahmet ÜK wrote:
>>
>> is your website and document coding in UTF-8?
>>
>>
>> 2007/5/10, tomasofen <tomasofen@yahoo.es>:
>>>
>>>
>>> Hi
>>>
>>> I have the same problem...
>>>
>>> I have a MySQL database where i can save Rusian characters using
>>> PHPMyAdmin
>>> or "MySQL Query Browser", and i can see the characters all right.
>>>
>>> When i try to save or read russian characters in the MySQL database
>>> using
>>> my
>>> ASP .NET web application, the process fails. The data saved in MySQL
>>> results
>>> in characters like this "? ? ? ? ?".
>>>
>>> The fact is that i test my ASP .NET application with a microssoft access
>>> database, and it works ok, saving and reading the russian characters ok.
>>>
>>> I install MySQL allowing multilanguage, so it is supposed to use utf8. I
>>> check the table deffinition where i want to save the data, and it is of
>>> course as utf8.
>>>
>>> I supposed it could be sommething in the connection string like that you
>>> explain in here, but i try to insert the "charset=utf8" in the
>>> connection
>>> string and it doesn't work neither. The current connection string i'm
>>> using
>>> is this:
>>>
>>> "DRIVER={MySQL ODBC 3.51
>>>
>>> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;OPTION=3;charset=utf8"
>>>
>>> I tried some changes to this string, like adding "pooling", or delete
>>> "option", but nothing works...
>>>
>>> I'm near to desesperation, becouse i don't know what else can i try :(
>>>
>>> Please, any idea there??
>>>
>>> Thanks in advance,
>>>
>>> Tomas
>>> --
>>> View this message in context:
>>> http://www.nabble.com/UTF-Problems-tf1225.html#a10412379
>>> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>>>
>>>
>>> --
>>> MySQL on .NET Mailing List
>>> For list archives: http://lists.mysql.com/dotnet
>>> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=ahmet34@gmail.com
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/UTF-Problems-tf1225.html#a10412558
> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>
>
> --
> MySQL on .NET Mailing List
> For list archives: http://lists.mysql.com/dotnet
> To unsubscribe:
> http://lists.mysql.com/dotnet?unsub=mysql.jorge@decimal.pt
>
>
>
> --
> MySQL on .NET Mailing List
> For list archives: http://lists.mysql.com/dotnet
> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@nabble.com
>
>
>

--
View this message in context:
http://www.nabble.com/UTF-Problems-tf1225.html#a10412855
Sent from the MySQL - .NET mailing list archive at Nabble.com.


--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:
http://lists.mysql.com/dotnet?unsub=mysql.jorge@decimal.pt



--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@nabble.com

Re: UTF Problems

by Jorge Bastos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well... no idea, i never used ODBC, only tryed to connect etc etc.
There another version of the ODBC driver:
http://dev.mysql.com/downloads/connector/odbc/5.0.html

try in a test application if it works ok with it, if not... don't know :)

Jorge

----- Original Message -----
From: "tomasofen" <tomasofen@...>
To: <dotnet@...>
Sent: Thursday, May 10, 2007 4:01 PM
Subject: Re: UTF Problems



Ah, ok

The application is very big, and it's right it uses connections with odbc.
Dued to it's size i can't think in chage it to ADO .NET at this moment...

Is there any problem with this using ODBC? Or perhaps this is not the right
thread to ask about it?

Tomás



Jorge Bastos wrote:

>
> Ah!
>
> Tomas, you're not using the MySQL ADO.NET driver!
> You're uding the MySQL ODBC Driver, diferent things.
>
>
> DRIVER={MySQL ODBC 3.51
> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;character
> set=utf8;pooling=false"
>
>
>
> ----- Original Message -----
> From: "tomasofen" <tomasofen@...>
> To: <dotnet@...>
> Sent: Thursday, May 10, 2007 2:02 PM
> Subject: Re: UTF Problems
>
>
>
> I had in my connection string "charset=utf8". I changed it for this one
> you
> tell, "character set=utf8", but it doesn't work...
>
> This is at this moment my connection string:
>
> DRIVER={MySQL ODBC 3.51
> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;character
> set=utf8;pooling=false"
>
>
>
>
> Jorge Bastos wrote:
>>
>> What about your connection string, do you have?
>> "character set=utf8"
>>
>>
>>
>>
>>
>> ----- Original Message -----
>> From: "tomasofen" <tomasofen@...>
>> To: <dotnet@...>
>> Sent: Thursday, May 10, 2007 1:39 PM
>> Subject: Re: UTF Problems
>>
>>
>>
>> Yes
>>
>> I have in the doccument the following meta:
>>
>> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
>>
>> And when you write russian text in a textbox it looks ok. And also the
>> program works ok with a Microsoft Access Database, so i suppose it is
>> correctly encoded in UTF8...
>>
>>
>>
>> Ahmet ÜK wrote:
>>>
>>> is your website and document coding in UTF-8?
>>>
>>>
>>> 2007/5/10, tomasofen <tomasofen@...>:
>>>>
>>>>
>>>> Hi
>>>>
>>>> I have the same problem...
>>>>
>>>> I have a MySQL database where i can save Rusian characters using
>>>> PHPMyAdmin
>>>> or "MySQL Query Browser", and i can see the characters all right.
>>>>
>>>> When i try to save or read russian characters in the MySQL database
>>>> using
>>>> my
>>>> ASP .NET web application, the process fails. The data saved in MySQL
>>>> results
>>>> in characters like this "? ? ? ? ?".
>>>>
>>>> The fact is that i test my ASP .NET application with a microssoft
>>>> access
>>>> database, and it works ok, saving and reading the russian characters
>>>> ok.
>>>>
>>>> I install MySQL allowing multilanguage, so it is supposed to use utf8.
>>>> I
>>>> check the table deffinition where i want to save the data, and it is of
>>>> course as utf8.
>>>>
>>>> I supposed it could be sommething in the connection string like that
>>>> you
>>>> explain in here, but i try to insert the "charset=utf8" in the
>>>> connection
>>>> string and it doesn't work neither. The current connection string i'm
>>>> using
>>>> is this:
>>>>
>>>> "DRIVER={MySQL ODBC 3.51
>>>>
>>>> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;OPTION=3;charset=utf8"
>>>>
>>>> I tried some changes to this string, like adding "pooling", or delete
>>>> "option", but nothing works...
>>>>
>>>> I'm near to desesperation, becouse i don't know what else can i try :(
>>>>
>>>> Please, any idea there??
>>>>
>>>> Thanks in advance,
>>>>
>>>> Tomas
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/UTF-Problems-tf1225.html#a10412379
>>>> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>>>>
>>>>
>>>> --
>>>> MySQL on .NET Mailing List
>>>> For list archives: http://lists.mysql.com/dotnet
>>>> To unsubscribe:
>>>> http://lists.mysql.com/dotnet?unsub=ahmet34@...
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/UTF-Problems-tf1225.html#a10412558
>> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>>
>>
>> --
>> MySQL on .NET Mailing List
>> For list archives: http://lists.mysql.com/dotnet
>> To unsubscribe:
>> http://lists.mysql.com/dotnet?unsub=mysql.jorge@...
>>
>>
>>
>> --
>> MySQL on .NET Mailing List
>> For list archives: http://lists.mysql.com/dotnet
>> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/UTF-Problems-tf1225.html#a10412855
> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>
>
> --
> MySQL on .NET Mailing List
> For list archives: http://lists.mysql.com/dotnet
> To unsubscribe:
> http://lists.mysql.com/dotnet?unsub=mysql.jorge@...
>
>
>
> --
> MySQL on .NET Mailing List
> For list archives: http://lists.mysql.com/dotnet
> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...
>
>
>

--
View this message in context:
http://www.nabble.com/UTF-Problems-tf1225.html#a10415157
Sent from the MySQL - .NET mailing list archive at Nabble.com.


--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:
http://lists.mysql.com/dotnet?unsub=mysql.jorge@...



--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...


Re: UTF Problems

by DG @ NEFACOMP :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

Try to run *[set names 'cp1251']* as your first query right after the
connection.
If I remember, there was a UTF problem (or bug) with MyODBC 3.51



Hope this helps,
Emery


tomasofen wrote:

> Ah, ok
>
> The application is very big, and it's right it uses connections with odbc.
> Dued to it's size i can't think in chage it to ADO .NET at this moment...
>
> Is there any problem with this using ODBC? Or perhaps this is not the right
> thread to ask about it?
>
> Tomás
>
>
>
> Jorge Bastos wrote:
>  
>> Ah!
>>
>> Tomas, you're not using the MySQL ADO.NET driver!
>> You're uding the MySQL ODBC Driver, diferent things.
>>
>>
>> DRIVER={MySQL ODBC 3.51
>> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;character
>> set=utf8;pooling=false"
>>
>>
>>
>> ----- Original Message -----
>> From: "tomasofen" <tomasofen@...>
>> To: <dotnet@...>
>> Sent: Thursday, May 10, 2007 2:02 PM
>> Subject: Re: UTF Problems
>>
>>
>>
>> I had in my connection string "charset=utf8". I changed it for this one
>> you
>> tell, "character set=utf8", but it doesn't work...
>>
>> This is at this moment my connection string:
>>
>> DRIVER={MySQL ODBC 3.51
>> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;character
>> set=utf8;pooling=false"
>>
>>
>>
>>
>> Jorge Bastos wrote:
>>    
>>> What about your connection string, do you have?
>>> "character set=utf8"
>>>
>>>
>>>
>>>
>>>
>>> ----- Original Message -----
>>> From: "tomasofen" <tomasofen@...>
>>> To: <dotnet@...>
>>> Sent: Thursday, May 10, 2007 1:39 PM
>>> Subject: Re: UTF Problems
>>>
>>>
>>>
>>> Yes
>>>
>>> I have in the doccument the following meta:
>>>
>>> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
>>>
>>> And when you write russian text in a textbox it looks ok. And also the
>>> program works ok with a Microsoft Access Database, so i suppose it is
>>> correctly encoded in UTF8...
>>>
>>>
>>>
>>> Ahmet ÜK wrote:
>>>      
>>>> is your website and document coding in UTF-8?
>>>>
>>>>
>>>> 2007/5/10, tomasofen <tomasofen@...>:
>>>>        
>>>>> Hi
>>>>>
>>>>> I have the same problem...
>>>>>
>>>>> I have a MySQL database where i can save Rusian characters using
>>>>> PHPMyAdmin
>>>>> or "MySQL Query Browser", and i can see the characters all right.
>>>>>
>>>>> When i try to save or read russian characters in the MySQL database
>>>>> using
>>>>> my
>>>>> ASP .NET web application, the process fails. The data saved in MySQL
>>>>> results
>>>>> in characters like this "? ? ? ? ?".
>>>>>
>>>>> The fact is that i test my ASP .NET application with a microssoft
>>>>> access
>>>>> database, and it works ok, saving and reading the russian characters
>>>>> ok.
>>>>>
>>>>> I install MySQL allowing multilanguage, so it is supposed to use utf8.
>>>>> I
>>>>> check the table deffinition where i want to save the data, and it is of
>>>>> course as utf8.
>>>>>
>>>>> I supposed it could be sommething in the connection string like that
>>>>> you
>>>>> explain in here, but i try to insert the "charset=utf8" in the
>>>>> connection
>>>>> string and it doesn't work neither. The current connection string i'm
>>>>> using
>>>>> is this:
>>>>>
>>>>> "DRIVER={MySQL ODBC 3.51
>>>>>
>>>>> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;OPTION=3;charset=utf8"
>>>>>
>>>>> I tried some changes to this string, like adding "pooling", or delete
>>>>> "option", but nothing works...
>>>>>
>>>>> I'm near to desesperation, becouse i don't know what else can i try :(
>>>>>
>>>>> Please, any idea there??
>>>>>
>>>>> Thanks in advance,
>>>>>
>>>>> Tomas
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/UTF-Problems-tf1225.html#a10412379
>>>>> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> --
>>>>> MySQL on .NET Mailing List
>>>>> For list archives: http://lists.mysql.com/dotnet
>>>>> To unsubscribe:  
>>>>> http://lists.mysql.com/dotnet?unsub=ahmet34@...
>>>>>
>>>>>
>>>>>          
>>>>        
>>> --
>>> View this message in context:
>>> http://www.nabble.com/UTF-Problems-tf1225.html#a10412558
>>> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>>>
>>>
>>> --
>>> MySQL on .NET Mailing List
>>> For list archives: http://lists.mysql.com/dotnet
>>> To unsubscribe:
>>> http://lists.mysql.com/dotnet?unsub=mysql.jorge@...
>>>
>>>
>>>
>>> --
>>> MySQL on .NET Mailing List
>>> For list archives: http://lists.mysql.com/dotnet
>>> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...
>>>
>>>
>>>
>>>      
>> --
>> View this message in context:
>> http://www.nabble.com/UTF-Problems-tf1225.html#a10412855
>> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>>
>>
>> --
>> MySQL on .NET Mailing List
>> For list archives: http://lists.mysql.com/dotnet
>> To unsubscribe:
>> http://lists.mysql.com/dotnet?unsub=mysql.jorge@...
>>
>>
>>
>> --
>> MySQL on .NET Mailing List
>> For list archives: http://lists.mysql.com/dotnet
>> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...
>>
>>
>>
>>    
>
>  

Parent Message unknown Re: UTF Problems

by SharpCoderMP :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi, if you still did not managed to make it work with odbc driver, then
i'm afraid you wont :( i had been fighting the same issue for a very
long time without effect. it seems like the MySQL ODBC driver is not
capable of doing all the communication in utf-8. what's worse it almost
looks like this driver is frozen for years.
i suggest you switch to Connector/Net it's easier to use and it just
works. i had a luck of using my own DbWrapper class that was wrapping
the db communication so the only thing i had to do was to change the
wrapper without touching the application's code and all runs now just fine.

tomasofen wrote:

> I had in my connection string "charset=utf8". I changed it for this one you
> tell, "character set=utf8", but it doesn't work...
>
> This is at this moment my connection string:
>
> DRIVER={MySQL ODBC 3.51
> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;character
> set=utf8;pooling=false"
>
>
>
>
> Jorge Bastos wrote:
>> What about your connection string, do you have?
>> "character set=utf8"
>>
>>
>>
>>
>>
>> ----- Original Message -----
>> From: "tomasofen" <tomasofen@...>
>> To: <dotnet@...>
>> Sent: Thursday, May 10, 2007 1:39 PM
>> Subject: Re: UTF Problems
>>
>>
>>
>> Yes
>>
>> I have in the doccument the following meta:
>>
>> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
>>
>> And when you write russian text in a textbox it looks ok. And also the
>> program works ok with a Microsoft Access Database, so i suppose it is
>> correctly encoded in UTF8...
>>
>>
>>
>> Ahmet ÜK wrote:
>>> is your website and document coding in UTF-8?
>>>
>>>
>>> 2007/5/10, tomasofen <tomasofen@...>:
>>>>
>>>> Hi
>>>>
>>>> I have the same problem...
>>>>
>>>> I have a MySQL database where i can save Rusian characters using
>>>> PHPMyAdmin
>>>> or "MySQL Query Browser", and i can see the characters all right.
>>>>
>>>> When i try to save or read russian characters in the MySQL database
>>>> using
>>>> my
>>>> ASP .NET web application, the process fails. The data saved in MySQL
>>>> results
>>>> in characters like this "? ? ? ? ?".
>>>>
>>>> The fact is that i test my ASP .NET application with a microssoft access
>>>> database, and it works ok, saving and reading the russian characters ok.
>>>>
>>>> I install MySQL allowing multilanguage, so it is supposed to use utf8. I
>>>> check the table deffinition where i want to save the data, and it is of
>>>> course as utf8.
>>>>
>>>> I supposed it could be sommething in the connection string like that you
>>>> explain in here, but i try to insert the "charset=utf8" in the
>>>> connection
>>>> string and it doesn't work neither. The current connection string i'm
>>>> using
>>>> is this:
>>>>
>>>> "DRIVER={MySQL ODBC 3.51
>>>>
>>>> Driver};SERVER=MyServerHere;DATABASE=MyDatabaseHere;UID=MyUserHere;PASSWORD=MyPasswordHere;OPTION=3;charset=utf8"
>>>>
>>>> I tried some changes to this string, like adding "pooling", or delete
>>>> "option", but nothing works...
>>>>
>>>> I'm near to desesperation, becouse i don't know what else can i try :(
>>>>
>>>> Please, any idea there??
>>>>
>>>> Thanks in advance,
>>>>
>>>> Tomas
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/UTF-Problems-tf1225.html#a10412379
>>>> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>>>>
>>>>
>>>> --
>>>> MySQL on .NET Mailing List
>>>> For list archives: http://lists.mysql.com/dotnet
>>>> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=ahmet34@...
>>>>
>>>>
>>>
>> --
>> View this message in context:
>> http://www.nabble.com/UTF-Problems-tf1225.html#a10412558
>> Sent from the MySQL - .NET mailing list archive at Nabble.com.
>>
>>
>> --
>> MySQL on .NET Mailing List
>> For list archives: http://lists.mysql.com/dotnet
>> To unsubscribe:
>> http://lists.mysql.com/dotnet?unsub=mysql.jorge@...
>>
>>
>>
>> --
>> MySQL on .NET Mailing List
>> For list archives: http://lists.mysql.com/dotnet
>> To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...
>>
>>
>>
>


----------------------------------------------------------------------
Ile masz w domu niepotrzebnych rzeczy?
Wymien sie z sasiadami >> http://link.interia.pl/f1a93



--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe:    http://lists.mysql.com/dotnet?unsub=lists@...