Created
October 4, 2014 19:26
-
-
Save brianmed/87859d8e5f6965670415 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my %ENTITIES; | |
my $ent = PerlApp::get_bound_file("entities.txt") || slurp(catfile(dirname(__FILE__), "entities.txt")); | |
for my $line (split "\x0a", $ent) { | |
next unless $line =~ /^(\S+)\s+U\+(\S+)(?:\s+U\+(\S+))?/; | |
$ENTITIES{$1} = defined $3 ? (chr(hex $2) . chr(hex $3)) : chr(hex $2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment