Re: Character set on 4.1 and ujis support

2005-06-26 Thread Batara Kesuma
Hi,

Thank you very much for the reply.


 $dbh-do(SET character_set_results=ujis');

This works! Is there any way I can set this value on MySQL config file,
so I don't need to change all my scripts?

Right now my my.cnf looks like:
[mysqld]
default-character-set=ujis
default-collation=ujis_japanese_ci

[client]
default-character-set=ujis

[mysql]
default-character-set=ujis


  What do your 'show' statements return when you execute them from the
  perl script?

character_set_clientujis
character_set_connectionlatin1
character_set_database  ujis
character_set_results   latin1
character_set_serverujis
character_set_systemutf8
character_sets_dir  /usr/share/mysql/charsets/

Why does character_set_connection set back to latin1? I already set the
ujis value in my.cnf, and if I connect using mysql client, this value is
correctly set to ujis. 

How can I set character_set_connection so it defaults to ujis, no matter
where is the connection coming from? 

--bk



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Character set on 4.1 and ujis support

2005-06-24 Thread Batara Kesuma
Hi,

I just moved my DB from 4.0 to 4.1.11. I used mysqldump to dump the data
first, and then inserted it to the new DB. The character set of the data
is EUC-JP (ujis). 

My problem is, I can see the character correctly if I connect to mysql
server using mysql client. For example:
# mysql -e SELECT name FROM USER LIMIT 1; test_db

But, when I call it from Perl DBI, I get data with wrong character set
(ex. The character displayed as ??? mark).

Here is my setting:
mysql show variables like %character%;
+--++
| Variable_name| Value  |
+--++
| character_set_client | ujis   |
| character_set_connection | ujis   |
| character_set_database   | ujis   |
| character_set_results| ujis   |
| character_set_server | ujis   |
| character_set_system | utf8   |
| character_sets_dir   | /usr/share/mysql/charsets/ |
+--++
7 rows in set (0.01 sec)

mysql show variables like %collation%;
+--+--+
| Variable_name| Value|
+--+--+
| collation_connection | ujis_japanese_ci |
| collation_database   | ujis_japanese_ci |
| collation_server | ujis_japanese_ci |
+--+--+
3 rows in set (0.00 sec)

What did I do wrong? How can I fix this problem? Thank you very much.

--bk

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Character set on 4.1 and ujis support

2005-06-24 Thread Gleb Paharenko
Hello.





What do your 'show' statements return when you execute them from the

perl script?







Batara Kesuma [EMAIL PROTECTED] wrote:

 Hi,

 

 I just moved my DB from 4.0 to 4.1.11. I used mysqldump to dump the data

 first, and then inserted it to the new DB. The character set of the data

 is EUC-JP (ujis). 

 

 My problem is, I can see the character correctly if I connect to mysql

 server using mysql client. For example:

 # mysql -e SELECT name FROM USER LIMIT 1; test_db

 

 But, when I call it from Perl DBI, I get data with wrong character set

 (ex. The character displayed as ??? mark).

 

 Here is my setting:

 mysql show variables like %character%;

 +--++

 | Variable_name| Value  |

 +--++

 | character_set_client | ujis   |

 | character_set_connection | ujis   |

 | character_set_database   | ujis   |

 | character_set_results| ujis   |

 | character_set_server | ujis   |

 | character_set_system | utf8   |

 | character_sets_dir   | /usr/share/mysql/charsets/ |

 +--++

 7 rows in set (0.01 sec)

 

 mysql show variables like %collation%;

 +--+--+

 | Variable_name| Value|

 +--+--+

 | collation_connection | ujis_japanese_ci |

 | collation_database   | ujis_japanese_ci |

 | collation_server | ujis_japanese_ci |

 +--+--+

 3 rows in set (0.00 sec)

 

 What did I do wrong? How can I fix this problem? Thank you very much.

 

 --bk

 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   ___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Character set on 4.1 and ujis support

2005-06-24 Thread mfatene
Hi,
you may use somethinh lik ethis :

$dbh-do(SET character_set_results=ujis');

look at http://dev.mysql.com/doc/mysql/en/charset-general.html

Hope that helps
Mathias

Selon Gleb Paharenko [EMAIL PROTECTED]:

 Hello.


 What do your 'show' statements return when you execute them from the
 perl script?



 Batara Kesuma [EMAIL PROTECTED] wrote:
  Hi,
 
  I just moved my DB from 4.0 to 4.1.11. I used mysqldump to dump the data
  first, and then inserted it to the new DB. The character set of the data
  is EUC-JP (ujis).
 
  My problem is, I can see the character correctly if I connect to mysql
  server using mysql client. For example:
  # mysql -e SELECT name FROM USER LIMIT 1; test_db
 
  But, when I call it from Perl DBI, I get data with wrong character set
  (ex. The character displayed as ??? mark).
 
  Here is my setting:
  mysql show variables like %character%;
  +--++
  | Variable_name| Value  |
  +--++
  | character_set_client | ujis   |
  | character_set_connection | ujis   |
  | character_set_database   | ujis   |
  | character_set_results| ujis   |
  | character_set_server | ujis   |
  | character_set_system | utf8   |
  | character_sets_dir   | /usr/share/mysql/charsets/ |
  +--++
  7 rows in set (0.01 sec)
 
  mysql show variables like %collation%;
  +--+--+
  | Variable_name| Value|
  +--+--+
  | collation_connection | ujis_japanese_ci |
  | collation_database   | ujis_japanese_ci |
  | collation_server | ujis_japanese_ci |
  +--+--+
  3 rows in set (0.00 sec)
 
  What did I do wrong? How can I fix this problem? Thank you very much.
 
  --bk
 


 --
 For technical support contracts, goto https://order.mysql.com/?ref=ensita
 This email is sponsored by Ensita.NET http://www.ensita.net/
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
 /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
___/   www.mysql.com




 --
 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]