Red Hat Bugzilla – Bug 103520
printf char N where N>127 produces 2 bytes instead of 1
Last modified: 2007-04-18 12:57:18 EDT
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 Description of problem: Under RedHat 9, when I use Perl to print a character whose ASCII decimal equivalent is greater than 127, I get two bytes instead of one. This difference does not appear in Perl distributions that came with RedHat Linux 6.2, 7.2, 7.3. (I don't have a RH 8.x box to test.) Version-Release number of selected component (if applicable): perl-5.8.0-88 How reproducible: Always Steps to Reproduce: perl -e 'printf("%c", 169);' | od -ab Actual Results: 0000000 B ) 302 251 0000003 Any ASCII decimal between 128 and 255 produces similar results (two bytes instead of one). Expected Results: 0000000 ) 251 0000002 Additional info: The following simple C program produces the expected results on the same platform: % cat test.c #include <stdio.h> main() { printf("%c", 169); } % cc test.c % ./a.out | od -ab 0000000 ) 251 0000002 % _
this is fixed in the perl in rawhide