[Top][All Lists]

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

Re: bash handles bytes instead of chars

From: ®om
Subject: Re: bash handles bytes instead of chars
Date: Mon, 22 Sep 2008 18:54:29 +0200
User-agent: Thunderbird/3.0a2 (X11; 2008072418)

Chet Ramey a écrit :
®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.


printf was only a way to send 0xe282ac on stdin of each tool, it doesn't matter how printf interprets the bytes. What is important is how the tool ("cut" for example, or read -n) interprets them :)

reply via email to

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