in reply to How to support Unicode for Embeded Perl

I have no experience with embedding Perl, but if it is anything like normal Perl, it has Unicode strings, that you can encode to UTF-8 on output. bytes_to_utf8 converts "ASCII" (read: ISO-8859-1) to a Perl Unicode string. If you are absolutely sure that your string is valid UTF-8, you can just set its UTF8 flag. If you're not absolutely sure, decode the string in Perl: $foo = decode("UTF-8", $foo).

To learn about Unicode in Perl, please read perlunitut, perlunifaq and perhaps perluniadvice. Good luck!

Juerd # { site => 'juerd.nl', do_not_use => 'spamtrap', perl6_server => 'feather' }

  • Comment on Re: How to support Unicode for Embeded Perl