On 10/15/07, thomas polnik <[EMAIL PROTECTED]> wrote:
snip
> If you want dertermine the length of a unicode string, you must use
> "use bytes;" Some weeks ago I forgot it and had some trouble :)
snip

This is a semantic point, but I think it is important: that will give
you how many bytes the string takes up.  This is not the same thing as
its length (which is why you have to use the bytes pragma).  The
length function returns "the length in characters of the value of
EXPR".  Since UTF8 may have one or more bytes per character the old,
sloppy expectation that length would equal the number of bytes used is
wrong.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to