in reply to Re: Re: Character Encoding and Windows Console woes
in thread Character Encoding and Windows Console woes

In 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.
Something for backward compatiblity, I think.
  • Comment on Re: Re: Re: Character Encoding and Windows Console woes

Replies are listed 'Best First'.
Re: Re: Re: Re: Character Encoding and Windows Console woes
by John M. Dlugosz (Monsignor) on Feb 17, 2004 at 05:12 UTC
    If at least one character in the string has a code of >= 0x100, then all characters >0x7F will be multi-byte encoded. If all the characters are less than 256, then it is also possible to encode the string with one byte per character. Some functions, like chr, make it a point to use the byte form when possible, since it's faster.