Re: de-utf8-ing a string

2007-10-18 Thread E R
On 10/17/07, Juerd Waalboer <[EMAIL PROTECTED]> wrote: > > utf8::downgrade(); Thanks!

Re: de-utf8-ing a string

2007-10-17 Thread Juerd Waalboer
E R skribis 2007-10-17 15:56 (-0500): > for (my $i = 0; $i < length($x); $i++) { > $new .= chr(ord(substr($x, $i, 1))); > } utf8::downgrade(); -- Met vriendelijke groet, Kind regards, Korajn salutojn, Juerd Waalboer: Perl hacker <[EMAIL PROTECTED]> Convolut

de-utf8-ing a string

2007-10-17 Thread E R
Hello, I need an efficient way to do this: my $buf; sub append { my $x = shift; my $new; for (my $i = 0; $i < length($x); $i++) { $new .= chr(ord(substr($x, $i, 1))); } $buf .= $new; } In practice, $buf will not have its utf8 flag set, and $x may have it set, but will not contain