develooper Front page | perl.perl5.porters | Postings from April 2007

Re: perl, the data, and the tf8 flag

Thread Previous | Thread Next
From:
Juerd Waalboer
Date:
April 1, 2007 14:03
Subject:
Re: perl, the data, and the tf8 flag
Message ID:
20070401210323.GP31277@c4.convolution.nl
Glenn Linderman skribis 2007-03-31 19:59 (-0700):
> I read perlunifaq again... so one can "encode_utf8", which presumably 
> causes a binary byte stream that contains the UTF-8 style of octets 
> sequences.
> $x = encode_utf8( $text_string ) . "\0" . pack( "template", @params);
> $retrieve_text_string = decode_utf8( $retrieve_text_string );

Yes!

> And so encode_utf8 is probably the solution to my question just above, 
> allowing "length in bytes" to be obtained for a UTF-8 encoded string.  
> And pulling it back out, one would decode_utf8 it...

Absolutely!
-- 
korajn salutojn,

  juerd waalboer:  perl hacker  <juerd@juerd.nl>  <http://juerd.nl/sig>
  convolution:     ict solutions and consultancy <sales@convolution.nl>

Ik vertrouw stemcomputers niet.
Zie <http://www.wijvertrouwenstemcomputersniet.nl/>.

Thread Previous | Thread Next


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