develooper Front page | perl.perl5.porters | Postings from February 2001

Re: Perl-Unicode fundamentals (was Re: IV preservation (was Re: [PATCH 5.7.0] compiling on OS/2))

From:
Ilya Zakharevich
Date:
February 21, 2001 08:30
Subject:
Re: Perl-Unicode fundamentals (was Re: IV preservation (was Re: [PATCH 5.7.0] compiling on OS/2))
Message ID:
20010221113009.B17436@math.ohio-state.edu
On Wed, Feb 21, 2001 at 10:21:57AM +0000, Nick Ing-Simmons wrote:
> So the transparency is achieved by having two representations (as ever)
>   
>    byte - cultural info from native EBCDIC
>    utf8 - transform and then hold as UTF-8 Unicode - cultural info from 
>           Unicode db.

This would make ord() non-transparent wrt the translation.  My
proposal is

    byte - cultural info from native locale

    utf8 - transform and then hold as UTF-8 locale-permuted Unicode -
	   cultural info in 0..255 range from the native locale,
	   cultural info in 256..7FFFFFFF range as in Unicode db,
	   cultural info in 80000000..FFFFFFFF range as in Unicode db
	   shifted by 80000000.

[the third range is used to use chars from latin1 which are not in
the locale's repertoire - IIUYC, no need for EBCDIC].

Ilya



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