[Top][All Lists]

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

[PATCH v2 0/3] quotearg improvements

From: bonzini
Subject: [PATCH v2 0/3] quotearg improvements
Date: Tue, 20 Dec 2011 09:57:54 +0100

From: Paolo Bonzini <address@hidden>

Here is what I'm pushing.  Thanks for the remarks.  I'll follow-up
patching standards.texi.

These patches implement the quoting standard that has been in use for
seven years in GCC.  In UTF-8 and GB-18030 locales, the second replaces
QUOTATION MARK.  In non-Unicode locales, the third patch replaces the
left-pointing grave accent is replaced by the closing quote.  This is
against the GNU Coding Standards, but it is preferrable because:

* it promotes consistency between GNU programs.  GCC is obviously
not going to change;

* no reasonable porting target renders ` and ' symmetrically (or
at least no porting target that is reasonable to base our standards
on).  X11 does not anymore.  The Linux framebuffer comes close, but the
result is still very ugly.  U+00B4 (ACUTE ACCENT) renders symmetrically,
but it is not part of ASCII.  It is not part of many ISO 8859 character
sets and notably not of ISO 8859-15.

* Unicode locales are widespread enough that the change is going
to affect a very small minority.

* the only other occurrence of `...' that I know of is M4 and TeX/Texinfo.
Most GNU programs that use M4 will use m4sugar or changequote to map the
quoting to [...].  TeX/Texinfo use `...' only in source code, just like
(even after these patches) the "`" string remains only in C source,
as a convention to represent the opening quote in translations.

The only disadvantage would be that if your error message quotes a
hard-coded string, it will have to use '...' in the source rather than
`...'.  Google Code Search hints that this should not to be a problem:
has eighty results, many of them false positive or coming from old
GCC releases.

For more information, see http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html

Paolo Bonzini (3):
  quotearg: fix Wikipedia link
  quotearg: fall back to Unicode single quotes in UTF-8 and GB-18030 locales
  quotearg: do not use grave accent for left quote

 NEWS                         |    9 ++++++
 lib/quotearg.c               |   65 +++++++++++++++++++++++++++++++----------
 lib/quotearg.h               |    6 ++-
 modules/quotearg             |    2 +
 tests/test-quotearg-simple.c |   12 ++++----
 5 files changed, 70 insertions(+), 24 deletions(-)


reply via email to

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