List:General Discussion« Previous MessageNext Message »
From:Jon Forsyth Date:December 12 2011 11:30pm
Subject:Re: Writing Arabic Text to a DataBase with Perl
View as plain text  
Hello Michaël,

Thank you for the tips.  SHOW CREATE TABLE helped me figure out that my
table was using Latin1 and I was able to change it to utf-8.  However, I
did not see any encoding specified on the column with this command.

I tried to fix the connection encoding with this line of Perl code:

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

Now the output is somewhat improved because the arabic is now writing to
the correct column, but it seems to have an unresolved encoding issue as
can be seen from a mysql command line query in the token_Arabic column:

+----+--------------+---------+
| id | token_Arabic | variant |
+----+--------------+---------+
|  1 | ??           | yA      |
|  2 | ????         | <bny    |
|  3 | ??           | dA      |
|  4 | ????????     | klmk    |
|  5 | ??????       | Ey$ryn  |
+----+--------------+---------+

Previously this query showed Arabic characters, just in the wrong column.

Thanks,

Jon

Thread
Writing Arabic Text to a DataBase with PerlJon Forsyth10 Dec
  • Re: Writing Arabic Text to a DataBase with Perlhsv13 Dec
  • Re: Writing Arabic Text to a DataBase with PerlRudolf Lippan13 Dec
Re: Writing Arabic Text to a DataBase with PerlJon Forsyth13 Dec
  • Re: Writing Arabic Text to a DataBase with PerlShiva13 Dec