perl-unicode

Re: converting between utf8 and bytes

2000-07-03 02:02:37
On Mon, Jul 03, 2000 at 10:34:17AM +0900, 
simon(_dot_)p(_dot_)cozens(_at_)jp(_dot_)pwcglobal(_dot_)com wrote:
I have an XS module which I've been meaning to put onto CPAN which
just flicks on the SvUTF bit on a variable. That'll do what you want
but it's a sick and disgusting hack.

I don't think it's sick, it's exactly what you need if you are reading a
binary protocol that uses utf8 for strings. The filehandle as a whole
needs to be bytary, but depending on the data you might decide that a
substring needs to be tagged as utf8.

-- 
The idea is that the first face shown to people is one they can readily
accept - a more traditional logo. The lunacy element is only revealed
subsequently, via the LunaDude. [excerpted from the Lunatech Identity Manual]

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