123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- require 5.006;
- while (<>) {
-
- next if /^
- next if /^\s*$/;
- chomp;
-
- if (/^\s*0x(..)\s*0x(....)\s*(#.*)/) {
-
- my $cs_code = $1;
- my $un_code = $2;
- my $un_name = $3;
-
- my $un_utf8 = join('',
- map { sprintf("%02X", $_) }
- unpack("U0C*", pack("U", hex($un_code)))
- );
- print " $cs_code $un_utf8 ; $un_name\n";
- } else {
- warn "Unrecognized line: '$_'";
- }
- }
|