develooper Front page | perl.perl5.porters | Postings from August 2012

blead now has utility for generating UTF-8 for characters

From:
Karl Williamson
Date:
August 27, 2012 10:57
Subject:
blead now has utility for generating UTF-8 for characters
Message ID:
503BB4F3.6030106@khwilliamson.com
I doubt that anyone outside myself these days would find this useful, 
but just in case...

This is a regen utility, utf8_strings.pl, that takes a list of Unicode 
code points and generates #defines which give the UTF-8 string constants 
for them; you can also request just the first byte in a numeric 
constant; and the rest of the bytes (as a string).  (I looked first at 
extending regcharclass.pl, but it wasn't really a fit.)

Various places in the regex code need these, which prior to this patch 
had to be manually figured-out and entered.  This also allows me to 
remove some #ifdef EBCDICs from the code (and fixes others where there 
should have been a difference for EBCDIC but wasn't).



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About