From: Jarkko Hietaniemi Date: Sat, 10 Nov 2001 18:55:21 +0000 (+0000) Subject: Bah. %X doesn't mean 0xC1, it means 0XC1. So let's %x. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=23bcb45a99d8c34501ff21d6933805d719b9809d;p=p5sagit%2Fp5-mst-13.2.git Bah. %X doesn't mean 0xC1, it means 0XC1. So let's %x. p4raw-id: //depot/perl@12936 --- diff --git a/lib/open.pm b/lib/open.pm index 6be8b97..5140f6b 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -156,10 +156,10 @@ For example: # the :locale will probe the locale environment variables like LANG use open OUT => ':locale'; open(O, ">koi8"); - print O chr(0x430); # Unicode CYRILLIC SMALL LETTER A = KOI8-R 0xC1 + print O chr(0x430); # Unicode CYRILLIC SMALL LETTER A = KOI8-R 0xc1 close O; open(I, "), "\n"; # this should print 0xC1 + printf "%#x\n", ord(), "\n"; # this should print 0xc1 close I; These are equivalent diff --git a/lib/open.t b/lib/open.t index 77587cb..397e8f8 100644 --- a/lib/open.t +++ b/lib/open.t @@ -88,9 +88,9 @@ $ENV{LANG} = 'ru_RU.KOI8-R'; # the :locale will probe the locale environment variables like LANG use open OUT => ':locale'; open(O, ">koi8"); -print O chr(0x430); # Unicode CYRILLIC SMALL LETTER A = KOI8-R 0xC1 +print O chr(0x430); # Unicode CYRILLIC SMALL LETTER A = KOI8-R 0xc1 close O; open(I, "), "\n"; # this should print 0xC1 +printf "%#x\n", ord(), "\n"; # this should print 0xc1 close I; %%%