Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Can't write cyrillic to DBD::mysql

by Corion (Patriarch)
on Jun 29, 2010 at 10:24 UTC ( [id://847086]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://847086]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 06:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found