bugGNU Core Utilities - Bugs: bug #8500, printf format %c fails

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #8500: printf format %c fails

Submitted by:  None
Submitted on:  Thu 08 Apr 2004 10:56:13 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: Jim Meyering <meyering>
Open/Closed: Closed

Sat 10 Apr 2004 10:21:06 AM UTC, comment #1:

Thanks for the report.
printf is doing the right thing, but as you note,
the documentation doesn't explain that with %b, %c, and %s,
the corresponding argument is interpreted as a string.

I'll add something to that effect.

Jim Meyering <meyering>
Project AdministratorIn charge of this item.
Thu 08 Apr 2004 10:56:13 AM UTC, original submission:

Following the printf(1) man page, format "%c" should
behave as used with printf(3), namely accept a numeric
argument and then interprete it as the ASCII value of a
single character.
Thus,
/usr/bin/printf "%c" 65
is supposed to send the letter "A" to stdout. In fact, "6"
is seen. BTW, bash's builtin printf behaves wrong, too.

Regards,
kno.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 10 Apr 2004 10:21:06 AM UTCmeyeringAssigned toNone=>meyering
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1