[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash handles bytes instead of chars

From: Chet Ramey
Subject: Re: bash handles bytes instead of chars
Date: Mon, 22 Sep 2008 12:06:14 -0400
User-agent: Thunderbird (Macintosh/20080707)

®om wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i486
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
> uname output: Linux rom-laptop 2.6.24-21-generic #1 SMP Mon Aug 25
> 17:32:09 UTC$
> Machine Type: i486-pc-linux-gnu
> Bash Version: 3.2
> Patch Level: 39
> Release Status: release

The Posix standard is pretty explicit that printf(1), because of the
underlying formatted output functions it uses, is byte-oriented.  There
is support for wide characters, but not for multibyte ones.  For instance,
strings printed with %s are bytes, precisions determine the number of
bytes printed, and return values are numbers of bytes.

I will take a look at the standard and see what it says about bytes in
the format string.


``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]