perl-unicode

Re: [Encode] UCS/UTF mess and Surrogate Handlings

2002-04-05 09:29:21
Jarkko Hietaniemi <jhi(_at_)iki(_dot_)fi> writes:
Well, there seems to be

 Perl_utf16_to_utf8(pTHX_ U8* p, U8* d, I32 bytelen, I32 *newlen)

in utf8.c that seems to be doing surrogate arithmetics, but I think
that's not much used (if at all), and I cannot see utf8_to_utf16.
(There's also

 Perl_utf16_to_utf8_reversed(pTHX_ U8* p, U8* d, I32 bytelen, I32 *newlen)


Should be a good starting point for the XS version ;-)

which does first a byteswap and then calls the non-reversed version).
I also can see that the Perl_utf16_to_utf8 is non-EBCDIC aware...

-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/