in reply to UTF spooky action

md5_hex expects each input character to be a byte (ord = 0..255), whether internally encoded as UTF-8 or not. That's fine.

For simplicity and efficiency, it converts these characters into actual bytes if the internal encoding is UTF-8 using utf8::downgrade or something equivalent.

This means your database or database interface (as used) expects bytes, so it expects your text to be *encoded*.

Replies are listed 'Best First'.
Re^2: UTF spooky action
by wes (Initiate) on Apr 20, 2009 at 17:34 UTC
    Thanks for the help, ikegami. utf8::downgrade had the same effect.
    ADO can be set up to accept utf8 through Win32::OLE. I had thought that my script already was set up like that, but when I looked at where it was declared, I saw that it was done in some old, probably deprecated way. Setting Win32::OLE->Option( CP => Win32::OLE::CP_UTF8 ) seems to solve all my problems. Thanks again!