Hi, Look at this : mysql> show variables like 'character%'; +--------------------------+-------------------------------------------- -------------+ | 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 | C:\Program Files\MySQL\MySQL Server 4.1\share\charsets/ | +--------------------------+-------------------------------------------- -------------+
I changed my.ini (.my.cnf) like this : [mysqld] # The TCP/IP Port the MySQL Server will listen on port=3306 log-bin = "C:/Program Files/MySQL/MySQL Server 4.1/Data/binlog" #Path to installation directory. All paths are usually resolved relative to this. basedir="C:/Program Files/MySQL/MySQL Server 4.1/" #Path to the database root datadir="C:/Program Files/MySQL/MySQL Server 4.1/Data/" # The default character set that will be used when a new schema or table is # created and no character set is defined ### default-character-set=latin1 default-character-set=latin2 C:\Program Files\MySQL\MySQL Server 4.1\data>net stop mysql41 Le service MySQL41 s'arrête. Le service MySQL41 a été arrêté. C:\Program Files\MySQL\MySQL Server 4.1\data>net start mysql41 Le service MySQL41 démarre. Le service MySQL41 a démarré. mysql> show variables like 'character%'; +--------------------------+-------------------------------------------- -------------+ | Variable_name | Value | +--------------------------+-------------------------------------------- -------------+ | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | latin1 | | character_set_results | latin1 | | character_set_server | latin2 | | character_set_system | utf8 | | character_sets_dir | C:\Program Files\MySQL\MySQL Server 4.1\share\charsets/ | +--------------------------+-------------------------------------------- -------------+ That's all. Mathias -----Original Message----- From: Fagyal Csongor [mailto:[EMAIL PROTECTED] Sent: dimanche 24 avril 2005 22:33 To: mysql@lists.mysql.com Subject: setting character sets "permanently" HI, I am using MySQL 4.1.11 on FC3, and I have trouble reading back latin2 characters. No wonder, as character_set_client, character_set_connection and character_set_results are all set to latin1. The problem is that I cannot set them to latin2 _permanently_, I mean every time I connect to the database I have to issue either $dbh->do("set collation_connection=latin2_general_ci"); $dbh->do("set character_set_client=latin2"); $dbh->do("set character_set_results=latin2"); OR $dbh->do("SET NAMES 'latin2'"); which is basically the same. Is there a way to tell the server that I want to use latin2 every time? I mean something like: (in my.cnf): please_always_use_this_character_set_or_i_go_crazy=latin2 or maybe would_you_stop_doing_character_set_conversions_as_i_know_what_i_insert_j ust_give_me_back_what_i_sent_to_you=1 ? I already set character-set-server=latin2 collation-server=latin2_hungarian_ci and they show up nicely in "show variables" (but this does not help me). Also my database/tables/clumns are set to latin2 (both the character set and the collaction). Thank you, - Csongor -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]