In both the existing source table and the newdb table, the column charset is set to cp1256 (which is windoze arabic). When I look at the data table in the source db with a viewer that will show that charset, it shows the arabic chars.my $sqlstatement = 'select name_arabic from data'; my $sth = $dbh->prepare($sqlstatement); my @row; my @cases; $sth->execute || die "Could not execute MySQL statement: $sqlstatement +"; while (@row=$sth->fetchrow_array) { push(@cases, [ @row ]); } $sth->finish(); for my $i (0..$#cases) { my $sqlstatement = 'insert into newdb.names (arabicname) values (? +)'; my $sth = $dbh->prepare($sqlstatement); $sth->execute($cases[$i][0]) || die "putsql could not execute MySQ +L statement: $sqlstatement"; $sth->finish(); }
After running the above code, when I look at newdb.names with the same viewer, it shows question marks substituted for the arabic chars.
So it would seem that in the course of reading and/or writing the data I am hosing up the char encoding somehow. Anyone know how I can straighten it out?
Thanks...Steve
In reply to Trouble with Perl MySQL Arabic by cormanaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |