Re: Filter::HTTPD, UTF-8 and cursing
hsw <[email protected]>
| Newsgroups | gmane.comp.lang.perl.poe |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
On Mar 22, 9:29 am, [email protected] (Philip Gwyn) wrote: > http: content=[["set", "START-USER_", "value", "\xC2\xA9t\xC2\xA9"]] $s = "\xC3\x83\xC2\xA9t\xC3\x83\xC2\xA9" - is not utf-8 chars. it's octets. Encode::decode_utf8($s) == "\x{a9}t\x{a9}" - it's chars (with utf8 flasg on). When you join octets (with 8-bit set) and unicode chars, octets will be converted to unicode chars: "\xC3" => "\x{C3}" ( == "\xc3\x83" in octets). Solution: decode data to native unicode before process data.