Fail to migrate non Unicode data to mysql 4.1.10

Fail to migrate non Unicode data to mysql 4.1.10

am 01.10.2005 15:53:21 von Rami Addady

Hello,

I'm migrating application and database form Mysql 3.23 to
mysql 4.1.10 and perl v5.8.5 on the latest version of CentOS 4.1 (RedHat
AS 4.1 clone)

The tables was create using Hebrew character set:
CREATE DATABASE `table-name` DEFAULT CHARACTER SET hebrew COLLATE
hebrew_general_ci;

And all the data was inserted from the old database dump.

Only from Perl I can't work properly with this Hebrew data. Perl application
can't display the Hebrew text or insert proper Hebrew. DBI module
fetch ????? values and insert nulls instead of Hebrew character to/from
the DB.

Other application like php (using phpmyadmin) or mysql shell command
work fine with Hebrew on the same table.

Installing the latest stable DBD module (DBD-mysql-3.0002) didn't help much.

Please advice.

Regards,
Rami Addady


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

RE: Fail to migrate non Unicode data to mysql 4.1.10

am 01.10.2005 19:22:24 von Shlomi Zlatopolsky

Try to use the following string after each establishing connection:

$dbh->do("SET character_set_client = hebrew");
$dbh->do("SET character_set_connection = hebrew");
$dbh->do("SET character_set_results = hebrew");

or (if you will use UTF-8):

$dbh->do("SET character_set_client = utf8");
$dbh->do("SET character_set_connection = utf8");
$dbh->do("SET character_set_results = utf8");

You can also add client section, default charset in my.ini file:

[mysql]
default-character-set=hebrew

or:

[mysql]
default-character-set=utf8

-----Original Message-----
From: Rami Addady [mailto:rami@active.co.il]
Sent: Saturday, October 01, 2005 3:53 PM
To: perl@lists.mysql.com
Subject: Fail to migrate non Unicode data to mysql 4.1.10

Hello,

I'm migrating application and database form Mysql 3.23 to
mysql 4.1.10 and perl v5.8.5 on the latest version of CentOS 4.1 (RedHat
AS 4.1 clone)

The tables was create using Hebrew character set:
CREATE DATABASE `table-name` DEFAULT CHARACTER SET hebrew COLLATE
hebrew_general_ci;

And all the data was inserted from the old database dump.

Only from Perl I can't work properly with this Hebrew data. Perl application
can't display the Hebrew text or insert proper Hebrew. DBI module
fetch ????? values and insert nulls instead of Hebrew character to/from
the DB.

Other application like php (using phpmyadmin) or mysql shell command
work fine with Hebrew on the same table.

Installing the latest stable DBD module (DBD-mysql-3.0002) didn't help much.

Please advice.

Regards,
Rami Addady


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:
http://lists.mysql.com/perl?unsub=zlatopol@netvision.net.il


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org