MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Wolfgang Riedel Date:August 3 2004 12:43pm
Subject:MySQL 4.1 and UTF8
View as plain text  
Hi,

I've followed the discussion about UTF8 and MySQL-4.0 in the last days 
... But now I need some additional explanation.
With version 4.1, support of different character sets is included. I see 
it in my server, that 'show variables like "%character%"' gives me some 
interesting information:
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | latin1                     |
| character_set_connection | latin1                     |
| character_set_database   | latin1                     |
| character_set_results    | latin1                     |
| character_set_server     | latin1                     |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+

Now I want to use unicode characters (german umlauts) concretely. What I 
have to do?
- have I to start my client with "mysql --character-set=utf8 ..." ?
- have I to create a table with "create table text (aa char(80) 
character set utf8)" ?
- have I to insert data with "insert into text values(_utf8 äöü)" ?
In all these cases (I'm doing so and I'm not doing so) I can insert 
umlauts and I see the data (with 'select') in my clients window. But in 
all these cases the resulting table frame is corrupted: the position of 
the trailing '|' is to left - so many places as there are umlauts in the 
column's value.
What's wrong? What is the right way to use unicode characters?

Thanks for help.
Wolfgang
Thread
set up UTF8 for MySQL 4.0.xGuofeng Zhang3 Aug
  • Re: set up UTF8 for MySQL 4.0.xEgor Egorov3 Aug
    • MySQL 4.1 and UTF8Wolfgang Riedel3 Aug
RE: set up UTF8 for MySQL 4.0.xGuofeng Zhang3 Aug
RE: set up UTF8 for MySQL 4.0.xGuofeng Zhang3 Aug
  • Re: set up UTF8 for MySQL 4.0.xEgor Egorov5 Aug