Date: 06/05/05 (MySQL Communtiy) Keywords: php, mysql, sql I'm hoping someone here can help me out, as I have a problem that is driving me crazy. I'm trying to get mysql to store and retrieve various bits of text in various languages, however, it's not entirely co-operating. As an example, I've stored part of the Russian alphabet (А Б В Г Д Е Ж З И Й К Л М Н О П) and I'm trying to retrieve it via a perl CGI script. I'm using PHPMyAdmin to store the strings, and it seems to think everything is fine - if I do a select on that record, it displays it properly, however if I try and display it using Perl, I get "? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?". I thought initially that it was a perl encoding thing - I've made sure that the content-type is set to utf-8 in both the HTTP header and the meta tag, but it seems to make no difference. I've also tried running it through the terminal as well as using a utf8-decode function, but I get the same result regardless. I'm beginning to wonder if it is mysql behaving oddly, though, as if I log into mysql through the terminal and select this record, I get "? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?" there as well - though for all I know, this could just mean that my terminal can't display Russian / UTF-8 characters! Does anyone have any ideas about how I can fix this or even if it's likely to be MySQL that's causing these issues or Perl? Source: http://www.livejournal.com/community/mysql/58443.html
|