in reply to Can't write cyrillic to DBD::mysql

Maybe your input data is not in UTF8 but in some other charset? Maybe you're using/sending Latin-1, which allows Umlaute?

Replies are listed 'Best First'.
Re^2: Can't write cyrillic to DBD::mysql
by Wolfgang (Novice) on Jun 29, 2010 at 10:34 UTC
    Definitely utf8, I checked the code with Devel::Peek, forwarded it in an email and put it back into an utf8 coded web page.

      Checking with Devel::Peek will only tell you whether Perl thinks that the string is encoded as utf8. I would print the output and then pipe it through hexdump or od -x to really see what octets are output.

      But if the data really is utf8, then the culprit seems to be DBD::mysql and how it handles/accepts utf8. Are you using placeholders?

        Devel::Peek dumps the string too; before trusting Devel::Peek I wrote my own hexdump, but the data stays the same :-)

        I tried doing just a 'dbh->do(sql) and a dbh->do(sql, undef, @placeholder). The result is the same: The cyrillic characters are replaced by '?'.
        Same effect happens with greek Characters, Xilman was supecting that everything not in code block 01 of utf might fail.

        Wolfgang