[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Whats the reason to suppress short unicode characters in printf?
From: |
Jim Meyering |
Subject: |
Re: Whats the reason to suppress short unicode characters in printf? |
Date: |
Mon, 4 Apr 2016 21:01:55 -0700 |
On Mon, Apr 4, 2016 at 7:43 PM, Mike Frysinger <address@hidden> wrote:
> the code as written has existed since it was first committed in Mar 2000:
> http://git.savannah.gnu.org/cgit/coreutils.git/commit/?h=29d3ba4a7b42ed1b40b963b6047f2412ea4843b1
> although the Author says Jim, the ChangeLog file says Bruno Haible.
>
> that predates the merge of file/text/shell utils into coreutils (2003),
> and printf was part of the shellutils project. unfortunately the history
> is pretty spotty that far back ... here's its mailing list archive:
> https://lists.gnu.org/archive/html/bug-sh-utils/
>
> so i guess really you'd have to ask Bruno and/or Jim. my guess is that
> it comes from the C standard:
> http://c0x.coding-guidelines.com/6.4.3.html
> and you might find this interesting:
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3881.pdf
I confirm it was a patch by Bruno Haible.
I have a copy of a message from him with the following changes
that appears to have been sent only to Markus Kuhn and me.
As he explained, these changes were motivated by the then-recent
approval of ISO C99. Here are the ChangeLog entries:
m4/ChangeLog:
2000-02-02 Bruno Haible <address@hidden>
* codeset.m4: New file.
* iconv.m4: New file.
* jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
lib/ChangeLog:
2000-02-02 Bruno Haible <address@hidden>
* config.charset: New file.
* localcharset.c: New file.
* unicodeio.h, unicodeio.c: New files.
* Makefile.am (DEFS): Add -DLIBDIR=...
(libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
(noinst_HEADERS): Add unicodeio.h.
(all-local, install-exec-local, charset.alias): New targets.
src/ChangeLog:
2000-02-02 Bruno Haible <address@hidden>
* printf.c: Include "unicodeio.h".
(usage): Mention \u and \U directives. \x outputs a byte, not a
character.
(print_esc): Implement \u and \U.
* Makefile.am (printf_LDADD): Add @LIBICONV@.
*** sh-utils-2.0e/lib/config.charset.bak Sun Jan 30 23:00:44 2000
--- sh-utils-2.0e/lib/config.charset Tue Feb 1 11:28:09 2000
...