Displaying 1 result from an estimated 1 matches for "g_unidata".
2007 Dec 08
2
Great work!
...return $text;
}
I was happy with this, but I'm a techie guy, and I like to use mathematical and
greek characters. So I also added to the same function:
# { unicode character name }
$text =~ s{ \{ (?=\S) (.+?) (?<=\S) \} }
{$_ = lc $1; s/[ \n\r]+/ /g; "&#".$g_unidata{$_}.";"}egsx;
where g_unidata is created like this:
# Table of unicode character names
my %g_unidata;
open (UNIDATA, "C:/Program Files/Markdown/UnicodeData.txt") or
die "UnicodeData.txt not found";
while (<UNIDATA>)
{
@_...