unimonkey has asked for the wisdom of the Perl Monks concerning the following question:
This, I believe, converts from the HTML encoding to utf8. Using a test string of "Ъѓس", I get 3 characters for each character when inserting into the DB. I can convert this from utf8 to utf16, but inserting into DB shows 2 characters for each character. I checked the hex value of the characters, and they correspond to the right unicode value - for 1066, I'm seeing 04 and 2A. I'm guessing something has to be done with my entire query string - I'm using Win32::ODBC, but I'm really not sure. I guess you can't just convert a string into utf16 and then insert it into another perl string SQL statement and expect it to know that part of it is utf16? Even if I manage to create a query string in utf16, will ODBC accept it? I haven't been able to do this.$string =~ s/&#(\d+);/chr $1/eg;
|
|---|