Re: setting utf8 in my.cnf..
Posted by: Tetsuro Ikeda
Date: June 01, 2005 10:44AM

Pedro Han wrote:
> Dear Tetsuro Ikeda,
>
> Thanks a lot.
>
> But it says this;
>
> mysql would have been started with the following
> arguments:
> --port=3306 --socket=mysql
> --default-character-set=utf8
> --default-character-set=
> utf8 --no-auto-rehash
>
> mysql> show variables like "%character%";show
> variables like "%collation%";
> +--------------------------+----------------------
> ----------+
> | Variable_name | Value
> |
> +--------------------------+----------------------
> ----------+
> | character_set_client | utf8
> |
> | character_set_connection | utf8
> |
> | character_set_database | latin1
> |
> | character_set_results | utf8
> |
> | character_set_server | latin1
> |
> | character_set_system | utf8
> |
> | character_sets_dir |
> L:\xampp\mysql\share\charsets/ |
> +--------------------------+----------------------
> ----------+
> 7 rows in set (0.01 sec)
>
> +----------------------+-------------------+
> | Variable_name | Value |
> +----------------------+-------------------+
> | collation_connection | utf8_general_ci |
> | collation_database | latin1_swedish_ci |
> | collation_server | latin1_swedish_ci |
> +----------------------+-------------------+
>
> What's next?

Pedro,

What are doing with your server's charset setting?
I saw your server had set utf8 at your first post.

Generally, for using non-latin1 characters, we need to make sure 3 things.

1. table is set the charset. even if your character_set_database or character_set_server
is latin1, you can make non-latin1 table like followings:

mysql> CREATE TABLE t1 (c1 char(10)) DEFAULT CHARACTER SET = utf8;

2. character_set_client and character_set_connection are set to the non-latin1 charset
This affect when you insert or update row, and making sure your data is correctly
stored in the table.

3. character_set_results is set the the non-latin1 charset or NULL.
This affect when you select the data from the table.

No2 and 3 are usually achived by "SET NAMES" directly, or setting to the clients (include
connector products) like this time.

So Anyway, you already set up, I think.

Cheers,
-- Tetsuro

Options: ReplyQuote


Subject
Views
Written By
Posted
143777
June 01, 2005 01:35AM
45961
June 01, 2005 03:48AM
38499
June 01, 2005 08:07AM
Re: setting utf8 in my.cnf..
38564
June 01, 2005 10:44AM
25989
June 01, 2005 11:32AM
24354
June 01, 2005 06:50PM
24644
November 24, 2007 05:15AM
26056
September 06, 2008 06:55PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.