Very strange. I can see that your script is writing the text as literal question marks (?), not as UTF-8 characters. Are these Chinese alphabet, rather than Latin-1? You said that phpMyAdmin shows the data correctly for these fields -- when you use the SQL tab to enter the
SELECT id, idAct, name, tutor FROM tablename WHERE idAct=2;line, do they display OK?
A few suggestions that might make debugging easier:
* add -w -T flags to the end of the first (#!) line, to warn about errors and problems
* move use DBI; up to the second line (after #! line)
* change the meta line to
print "<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />";* put \n at the end of each line (...\t\t@row<hr>\n";)
No promises that this will fix the problem, but it might make it easier to see what's going on.
I'm not familiar with using Perl with non-Latin alphabets, but I'm wondering if you need to set something in Perl to tell it that you're using UTF-8 characters, possibly DBI->set_encoding(....) or something like that. That it's putting ??? into the HTML output leads me to wonder if these are 24-bit characters (UTF-8 encoding of CJK) that Perl simply doesn't know how to handle in strings. There's an I18N library module, but I don't know if it does anything more than collation control (for string comparisons). Do the number of ??? triplets match the expected number of CJK ideographs in the data? If they do, that would suggest that somewhere between MySQL and Perl handling this text, it's getting confused about the data and converting each character to ???. If that's what's happening, I'm going to have to defer to a Perl expert, as that's beyond my skill level.