Hello, I hope someone can help me solve this. I am trying to write 2 string values to separate fields of the same row in a mysql DB table using the Perl Module DBD::mysql. One string value is of English letters, while the other is of Arabic letters. However, they are somehow switched and written to the wrong field--the Arabic to the English and English to the Arabic field. I believe my file handle declaration ensures that the encoding i'm dealing with is UTF-8:
--- open my $file, '<:encoding(utf8)', 'input_file.xml' or die "cannot open file: $!"; --- and the mysql query: --- $dbh->do("INSERT INTO bama_xml (token_Arabic, variant) VALUES ('$arab','$engl');"); --- I tried switching the values as below, but they still write to the wrong place. --- $dbh->do("INSERT INTO bama_xml (token_Arabic, variant) VALUES ('$engl','$arab');"); --- I also dropped the English string completely, but the Arabic still writes to the wrong field--strange behavior, but I'm sure it's a problem with the Arabic. Thanks, Jon