help about the charset

help about the charset

am 03.02.2010 09:56:01 von moli

Hello,

I have a strange problem on the charset on mysql.
I'm using mysql-5.0.45, compiled from the source, and enabled:
'--with-charset=utf8' '--with-extral-charsets=all'
when compiling it.

My default charset in my.cnf is utf8:
character-set-server=utf8

OK I logined into mysql and run:

mysql> set names 'gbk';
ERROR 1115 (42000): Unknown character set: 'gbk'

The error shows as above.

These were the 'show' command's output:

mysql> show variables like 'character%';
+--------------------------+-------------------------------- --------+
| Variable_name | Value |
+--------------------------+-------------------------------- --------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /var/mysql5.0.45/share/mysql/charsets/ |
+--------------------------+-------------------------------- --------+
8 rows in set (0.00 sec)

mysql> show charset like 'utf8';
+---------+---------------+-------------------+--------+
| Charset | Description | Default collation | Maxlen |
+---------+---------------+-------------------+--------+
| utf8 | UTF-8 Unicode | utf8_general_ci | 3 |
+---------+---------------+-------------------+--------+
1 row in set (0.01 sec)

mysql> show charset like 'gbk';
Empty set (0.00 sec)


Since I have enabled --with-extral-charsets=all why can't I use gbk charset?
How to resolve it?

Thanks.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: help about the charset

am 03.02.2010 11:33:51 von Thiyaghu CK

--001636eee35d27f4f9047eafc131
Content-Type: text/plain; charset=ISO-8859-1

Hi Moli,

I hope this is because there is spelling mistake. It should be *
'--with-extra-charsets=all'*, but you have given
'--with-*extral*-charsets=all'.
That's why only the utf8 has been installed and not the other charsets.

Regards,
Thiyaghu CK
www.mafiree.com

On Wed, Feb 3, 2010 at 2:26 PM, wrote:

> Hello,
>
> I have a strange problem on the charset on mysql.
> I'm using mysql-5.0.45, compiled from the source, and enabled:
> '--with-charset=utf8' '--with-extral-charsets=all'
> when compiling it.
>
> My default charset in my.cnf is utf8:
> character-set-server=utf8
>
> OK I logined into mysql and run:
>
> mysql> set names 'gbk';
> ERROR 1115 (42000): Unknown character set: 'gbk'
>
> The error shows as above.
>
> These were the 'show' command's output:
>
> mysql> show variables like 'character%';
> +--------------------------+-------------------------------- --------+
> | Variable_name | Value |
> +--------------------------+-------------------------------- --------+
> | character_set_client | utf8 |
> | character_set_connection | utf8 |
> | character_set_database | utf8 |
> | character_set_filesystem | binary |
> | character_set_results | utf8 |
> | character_set_server | utf8 |
> | character_set_system | utf8 |
> | character_sets_dir | /var/mysql5.0.45/share/mysql/charsets/ |
> +--------------------------+-------------------------------- --------+
> 8 rows in set (0.00 sec)
>
> mysql> show charset like 'utf8';
> +---------+---------------+-------------------+--------+
> | Charset | Description | Default collation | Maxlen |
> +---------+---------------+-------------------+--------+
> | utf8 | UTF-8 Unicode | utf8_general_ci | 3 |
> +---------+---------------+-------------------+--------+
> 1 row in set (0.01 sec)
>
> mysql> show charset like 'gbk';
> Empty set (0.00 sec)
>
>
> Since I have enabled --with-extral-charsets=all why can't I use gbk
> charset?
> How to resolve it?
>
> Thanks.
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=theyahoock@gmail.com
>
>

--001636eee35d27f4f9047eafc131--

Re: help about the charset

am 03.02.2010 13:23:26 von moli

On Wed, Feb 3, 2010 at 6:33 PM, Thiyaghu CK wrote:
> Hi Moli,
>
> I hope this is because there is spelling mistake. It should be
> '--with-extra-charsets=all', but you have given
> '--with-extral-charsets=all'. That's why only the utf8 has been installed
> and not the other charsets.
>


Thanks a lot Thiyaghu.
I really inputed the wrong compiling arguments by mistake.
Now I adjust it and recompile mysql, all goes fine.
Thanks.

-- moli

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org