in reply to length in bytes of utf8 string

Well here's a little gotcha (from perldoc perlunicode):
Unicode characters can also be added to a string by using the \x{...} notation. The Unicode code for the desired character, in hexadecimal, should be placed in the braces. For instance, a smiley face is \x{263A}.This encoding scheme only works for characters with a code of 0x100 or above.
You could say $x = pack("U", 0xfc);

Replies are listed 'Best First'.
Re: Re: length in bytes of utf8 string
by mrd (Beadle) on Jun 27, 2003 at 11:13 UTC
    Thanks. That should be bolded in perlunicode too.