perl-unicode

Re: Inverse of /\p{script}/

2003-08-29 00:30:08
Jarkko Hietaniemi <jhi(_at_)iki(_dot_)fi> writes:
On Thu, Aug 28, 2003 at 03:16:20PM +0100, nick(_at_)ing-simmons(_dot_)net 
wrote:

Does the existing perl5.8.* Unicode support have a way to efficently 
determine which script(s) or block (in unicode sense) a code point belongs
to?

      use Unicode::UCD qw(charscript charblock);
      print charscript(0x0388);
      print charblock (0x30a0);

Great.



It seems to make sense to have a hash which maps script names to 
probable (font) encodings 

 (Hiragana | Katakana | Han) => 'jisx0208.1990-0'
 (Greek)                     => 'iso8859-7',  

I dunno about script->font mappings...

That is Tk's (i.e. my) problem.
XFree86 has the font encodings bundled so I think I can pre-analysze 
them.



So give a (1 character) string how do I get Unicode script/block it is in?

<Prev in Thread] Current Thread [Next in Thread>