[Top][All Lists]

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

Re: [bug-gettext] [gnu-prog-discuss] U+2018 symbol U+2019

From: Paolo Bonzini
Subject: Re: [bug-gettext] [gnu-prog-discuss] U+2018 symbol U+2019
Date: Fri, 25 Nov 2011 15:25:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1

[Cc bug-gnulib/gettext/standards/texinfo, Bcc gnu-prog-discuss]

On 11/25/2011 02:51 PM, Thien-Thi Nguyen wrote:
GNU programs are urged to use `symbol' (grave, symbol, apostrophe)
in README, Texinfo uses those to implement @code in Info files, etc.

I propose GNU adopt U+2018 symbol U+2019 instead, where U+ means
"Unicode character/codepoint/craziness?".  E.g.:


(YMailreaderMV, obviously.)  By adopt, i mean explicitly specify in
the GNU Coding Standards, add Texinfo and gettext support, and so on.
Although Unicode offers a great many quote pairs to choose from,[0]
IMHO U+2018 and U+2019 are closest to the original spirit.

I realize this proposal makes some people sad; i shared that feeling
for a long while.  It faded, eventually, and that's why i write now.

gcc is already doing it.

$ gcc f.c
f.c: In function ‘main’:
f.c:11:12: error: ‘LC_ALL’ undeclared (first use in this function)

I think it would be great if Texinfo did it in info files.

Also, gettext and gnulib have support for quoting as well (via address@hidden locales and the quote module), though I cannot convince coreutils to use it:

  $ LC_ALL=it_IT.UTF-8 ls abc\ def
  ls: impossibile accedere a abc def: File o directory non esistente

  $ LC_ALL=cs_CZ.UTF-8 ls f.adf\ ghi
  ls: nelze přistoupit k f.adf ghi: Adresář nebo soubor neexistuje


- for programs using gnulib+gettext, therefore, there is very little to do in the programs themselves.

- gnulib needs to add support for address@hidden and address@hidden in gnulib's bootstrap script.

- perhaps if we cannot convince distributions to use quot locales more extensively, gettext should be changed to use them by default and build @quot variants for other languages too? Possibly with a custom quoting choice for each language, e.g. guillemets for French and U+300C/U+300D quotes for CJK (like 「鉤括弧」).

- for programs not using gettext, we could perhaps add a gnulib module that automatically provides a coding of U+2018/U+2019, like this:

        printf ("foo %s %s\n", lq(), rq());

Unfortunately this:

#define LQ 0x2018
#define RQ 0x2019

        printf ("foo %lc %lc\n", LQ, RQ);

seems not to work unless setlocale has been called before.

I'm not sure if using gettext("`")/gettext("'") in lq/rq would be a good idea. If the program uses gettext, the messages should just use ` and '. Then the task of using appropriate quotes could be left to translators and/or msgfmt and/or quot.sed.

Then of course all this should be documented in the GNU Coding Standards. Volunteers? :)


reply via email to

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