List:MySQL and .NET« Previous MessageNext Message »
From:Duncan Paul Attard Date:October 26 2004 2:41pm
Subject:Unicode Problem with MySql and C#
View as plain text  
I have a problem regarding unicode characters and MySql.
I am using MySql 4.1 and MySql Connector/NET together with
C#.

My question is whether I' am making a silly mistake (or not), 
by not being able to store unicode characters in a simple table.

The database I have created is supposed to be in unicode:
'CREATE DATABASE test CHARACTER SET utf8'.

Now, connecting from C#, i am trying to write into a simple
table, with one column, the value '\u0120\u0121\u0125\u0411'
but when I am retrieving the value from the table, '????' is
returned as a result.

I don't know if its relevant, but i have checked that the 
server and connection are using unicode encoding:

SHOW VARIABLES LIKE 'character_set_server' which returns 
'utf8' as a result.

also:
SHOW VARIABLES LIKE 'character_set_connection' returns
'utf8' as a result.

I would very much appreciate if someone would answer this
question.

Thanks in advance, and looking foward to hearing from someone,
Duncan.

Attachment: [text/html]
Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.269 / Virus Database: 264.12.3 - Release Date: 25/10/2004
Thread
Unicode Problem with MySql and C#Duncan Paul Attard26 Oct
  • Re: Unicode Problem with MySql and C#Jorge Bastos26 Oct
  • Re: Unicode Problem with MySql and C#Reggie Burnett27 Oct
  • Re: Unicode Problem with MySql and C#Jorge Bastos27 Oct
    • Re: Unicode Problem with MySql and C#Reggie Burnett27 Oct