in reply to Re^3: Can't write cyrillic to DBD::mysql
in thread Can't write cyrillic to DBD::mysql

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
  • Comment on Re^4: Can't write cyrillic to DBD::mysql

Replies are listed 'Best First'.
Re^5: Can't write cyrillic to DBD::mysql
by Corion (Patriarch) on Jun 29, 2010 at 12:07 UTC

    My guess, which is totally not based on any facts, is that your table/column stores its data in Latin-1, even though you can send/receive the data in utf8. I don't know enough about MySQL to know whether that's a possibility though, so take this with a large grain of salt.

      It is a long time since I last used MySQL but I recollect tables needed to be created with a CHARSET. We used to do something like:

      CREATE TABLE mytable ( columns ) TYPE = INNODB DEFAULT CHARSET utf8;

        That is the way I did it.

        Besides: It works with phpMyAdmin, so it should not be a problem of the data base itself.

        Wolfgang

      That was my guess, too. But I can store data with phpMyadmin and I can check it with the Mysql Query Browser which shows me the binary representation. And of course, that works with characters that do not have a representation in Latin-1

      So my best guess is, that some init is done wrong with perl but working with phpmyadmin

      Wolfgang