X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/42302c75aa79bb1f14328d6b249379169f5a4fa1..bb412b576d883e11a4ec09d01c34a933d894af6c:/charset-utf8.inc.pl diff --git a/charset-utf8.inc.pl b/charset-utf8.inc.pl new file mode 100644 index 0000000..c751e6d --- /dev/null +++ b/charset-utf8.inc.pl @@ -0,0 +1,28 @@ +my %utf8byte = ( + 0x00, 'single byte ASCII', + 0x80, 'multi-byte continuation', + 0xC0, '(overl.)', + 0xC2, '2-byte sequence start', + 0xD0, '', + 0xE0, '3-byte sequence start', + 0xF0, '4-byte sequence', + 0xF5, '(overflow)', + 0xF8, '5-byte', + 0xFC, '6-byte', + 0xFE, 'invalid', +); + +sub { + return defined $utf8byte{$_[0]} ? $utf8byte{$_[0]} : (); +} +