There's more than one way to do things | |
PerlMonks |
Re^3: i18n/utf8 problem, 'utf8 "\xF8" does not map to Unicode'by Juerd (Abbot) |
on Feb 25, 2008 at 15:04 UTC ( [id://670014]=note: print w/replies, xml ) | Need Help?? |
If you have the raw bytestring, the easiest way to see if it's valid UTF-8 is to decode it to a unicode string. If that fails, it wasn't utf8 enough :) or If you leave out the "or die" clause, any invalid UTF-8 will just be seen as ISO-8859-1. Update: changed the examples as per ikegami's sound response.
In Section
Seekers of Perl Wisdom
|
|