freebsd-dev/usr.bin/printf
Jilles Tjoelker 98102dabd3 printf: Allow multibyte characters for '<char> form, avoid negative codes.
Examples:
  LC_ALL=en_US.UTF-8 printf '%d\n' $(printf \'\\303\\244)
  LC_ALL=en_US.ISO8859-1 printf '%d\n' $(printf \'\\344)
Both of these should print 228.

Like some other shells, incomplete or invalid multibyte characters yield the
value of the first byte without a warning.

Note that there is no general way to go back from the character code to the
character.
2011-05-28 11:37:47 +00:00
..
Makefile Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
printf.1 printf: Allow multibyte characters for '<char> form, avoid negative codes. 2011-05-28 11:37:47 +00:00
printf.c printf: Allow multibyte characters for '<char> form, avoid negative codes. 2011-05-28 11:37:47 +00:00