[Top][All Lists]

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

quote characters in stds

From: Karl Berry
Subject: quote characters in stds
Date: Tue, 7 Jun 2005 09:15:04 -0400

rms wants to address the issue of quote characters in the GNU coding
standards.  Among the people I've talked to, there's a general consensus
that it would be best to stick to ASCII at least for the C locale, and
rms agreed with that.  Paul Eggert (thanks Paul) and I drafted some text
following that.  I thought before I sent it back to rms, I would see if
anyone else had comments ... see below if you care.

I am not sure if rms himself will accept everything in here, but we
should at least try to submit something that minimizes unhappiness among
the programmers.

BTW, the Gnulib doc today does not talk about quotes, but I will add
something before any coding standards change gets distributed.  (Since I
do the actual coding standards updates, I can be sure of this. :)


@node Quote characters
@section Quote characters
@cindex quote characters

In the C locale, GNU programs should stick to plain ASCII for
quotation characters in messages to users: either 0x60 (`) for left
quotes and 0x27 (') for right quotes, or ' for both opening and
closing, or " (0x22) for both opening and closing.  It is ok, but not
required, to use locale-specific quotes in other locales.

The @uref{http://www.gnu.org/software/gnulib/, Gnulib} @code{quote}
and @code{quotearg} modules provide a reasonably straightforward way
support locale-specific quote characters, as well as taking care of
other issues, such as quoting a filename that itself contains a quote
character.  See the Gnulib documentation for usage details.

ASCII should also be preferred in source code comments, text
documents, and other contexts, unless there is good reason to do
something else because of the domain at hand.

If you need to use non-ASCII characters, for example to represent
names of contributors, you should normally stick with one encoding, as
one cannot in general mix encodings reliably.  address@hidden is the
most widely usable encoding today, after plain address@hidden

Quotation characters are a difficult area in the computing world at
this time: there are no true left or right quote characters in ASCII,
or even address@hidden  address@hidden does have paired standalone
accents, but it seems wrong in principle to abuse them as quotes.  And
even address@hidden is not universally usable.

Unicode contains the unambiguous quote characters required, and its
common encoding address@hidden is upward compatible with address@hidden  But
Unicode and UTF-8 are deployed less widely than address@hidden; it would
be premature to require Unicode support for running essentially every
GNU program.

Perhaps the prevailing situation will change in a few years, and then
we will revisit this.

reply via email to

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