Last Comment Bug 16206 - (Default-Quotes) Initial value for 'quotes' property could be nicer [GC]
(Default-Quotes)
: Initial value for 'quotes' property could be nicer [GC]
Status: RESOLVED WONTFIX
[Hixie-PF]
: css2, testcase
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
: P5 enhancement with 15 votes (vote)
: Future
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
http://www.bath.ac.uk/%7Epy8ieh/inter...
: 22882 41778 106258 144853 210457 213617 287299 300621 304762 338056 354356 370932 (view as bug list)
Depends on: nested-quotes 35768
Blocks: 56362 373733 html4.01 robin's 144853
  Show dependency treegraph
 
Reported: 1999-10-12 12:59 PDT by Hixie (not reading bugmail)
Modified: 2014-04-26 03:20 PDT (History)
59 users (show)
roc: blocking1.9.1-
roc: wanted1.9.1-
samuel.sidler+old: wanted1.9.0.x-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch html.css for de, en, fr, it, nl and no (1.20 KB, patch)
2002-08-15 13:34 PDT, Tobias Burnus
no flags Details | Diff | Splinter Review
v2: Updated patch; added es, es-es, nn and nb (1.44 KB, patch)
2002-08-16 06:20 PDT, Tobias Burnus
no flags Details | Diff | Splinter Review
v3: Updated patch; added cs (1.52 KB, patch)
2007-03-12 12:11 PDT, petr.pisar
no flags Details | Diff | Splinter Review
alternative patch (Jörg Hartmann's approach) (4.60 KB, patch)
2008-08-12 17:38 PDT, Zack Weinberg (:zwol)
no flags Details | Diff | Splinter Review

Description Hixie (not reading bugmail) 1999-10-12 12:59:00 PDT
The initial value of the 'quotes' property at the moment appears to be
   quotes: '"' '"';
This is quite boring. I would suggest the initial value be changed to:
   quotes: "\201C" "\201D" "\2018" "\2019";
...as recommended in the spec. This would result in some much nicer looking
quotes. See the last test of the first section of this test page:
   http://www.bath.ac.uk/%7Epy8ieh/internet/eviltests/content/2.html

Note that for a slightly more i18n-aware version, we may require some styles in
the html.css resource along the lines of:

   :root:lang(de), :lang(de) > Q { quotes: '»' '«' '\2039' '\203A' }
   :root:lang(en), :lang(en) > Q { quotes: "\201C" "\201D" "\2018" "\2019"; }
   :root:lang(fr), :lang(fr) > Q { quotes: '« ' ' »' }
   :root:lang(no), :lang(no) > Q { quotes: "«" "»" "<" ">" }

...or some such. (Note that we can't use the universal selector or it will
mess up inheritance!) This issue should probably be broken off and sent off
for some more research...
Comment 1 Nicholas Cull 2000-01-02 19:59:59 PST
*** Bug 22882 has been marked as a duplicate of this bug. ***
Comment 2 Nicholas Cull 2000-01-02 20:01:59 PST
The URL given in bug 22882 also has some good test cases.
Comment 3 Karl Ove Hufthammer 2000-01-05 09:11:59 PST
One small comment. For Norwegian, this is more typographically correct:

:root:lang(no), :lang(no) > Q { quotes: "\AB" "\BB" "\2039" "\203A"; }
Comment 4 Hixie (not reading bugmail) 2000-01-13 16:06:59 PST
Migrating from {css2} to css2 keyword. The {css1}, {css2}, {css3} and {css-moz}
radars should now be considered deprecated in favour of keywords.
I am *really* sorry about the spam...
Comment 5 Matthew Paul Thomas 2000-01-30 22:51:11 PST
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=4733
A test-case for bug 1061 and bug 16206.
Comment 6 buster 2000-05-08 10:25:03 PDT
this can wait until M18
Comment 7 buster 2000-05-23 12:05:21 PDT
Notes from troy:
Today, the quote character is hard coded, generated content in the frame 
construction code.  We should remove this hard coding (there are comments in the 
code), so for example we could handle quote set to "none" or to any arbitrary 
string.
Comment 8 buster 2000-06-01 14:21:24 PDT
redistributing bugs across future milestones, sorry for the spam
Comment 9 Hixie (not reading bugmail) 2000-06-15 11:55:49 PDT
*** Bug 41778 has been marked as a duplicate of this bug. ***
Comment 10 Hixie (not reading bugmail) 2000-06-15 11:59:05 PDT
Since we need this to make <Q> fully supported for HTML4, marking that this bug
blocks meta-bug 7954.
Comment 11 Hixie (not reading bugmail) 2000-07-25 22:59:41 PDT
As per meeting with ChrisD today, taking QA.
Comment 12 Tobias Burnus 2000-07-31 09:08:16 PDT
Some comments to this attachement:
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=4733

German:
> There is ,,another method of quoting&ldquo;, but it would be harder to 
> implement properly, and it's usually only used with Fraktur (Gothic       
> black-letter) lettering styles.)
Well in newspapers, handwritten etc. this quoting ,,Peter sagt: ,Ich gehe ins
,Delphi'.' '' is most comon. (The >>Peter says: >I go to the >Delphi<.< << is
the style mostly used in books.) I would prefer the ,,...'' quotes in a browser.
Note: The quotation marks are inversed French ones: >foo< instead of <foo>.
(an extra rule applys to de-CH which uses for Antiqua typesetting the French qm:
<<foo <bar> foo>>)

* Spacing. If two quotion marks follow each other a small space must be inserted
(see above, between the <«)

* In Germany we use _double_ quotation marks as outer and _single_ q.m. as
inner. If we nest more q.m. we still use single q.m. (see above example)
As far as I know the same is true for Frensh, Italian etc.

* As far as I know there is a difference between en-GB and en-US.
en-GB uses `outer ``inner'' outer' and en-US uses ``outer `inner' outer''

* Some more quotation signs:
GERMAN: 
   OUTER: ,,...`` -- [,,]<- one sign [&ldquo;]
   INNER: , ...`  -- [,] [&lsquo;]
or
   OUTER: »...« [»][«]
   INNER: >..<  
 Swiss (,, is also common):
   OUTER: «..» [«][»]
   INNER: <..>

FRENSH:  As Swiss (<<)
ITAlIAN: Like in Frensh (there is also `foo, but this is rarely used one for
some headlines)
DUTSH: Such as ,,foo ,bar' bar'' (the upperquote looks like a nine: 
                                  &rsquo;&rdquo;)
Comment 13 Karl Ove Hufthammer 2000-07-31 11:01:34 PDT
> * Spacing. If two quotion marks follow each
> other a small space must be inserted
> (see above, between the <«)

Yes, this should be a non-breaking 'thin space' (the thin space is U+2009).

> * In Germany we use _double_ quotation marks as outer
> and _single_ q.m. as inner. If we nest more q.m. we
>  still use single q.m. (see above example)
> As far as I know the same is true for Frensh, Italian etc.

In Norwegian we alternate: «foo <faa «fi <fo> fi» faa> foo» (where the <> 
aren't <> but U+2039 and U+203A).

> * As far as I know there is a difference between en-GB
> and en-US. en-GB uses `outer ``inner'' outer' and
> en-US uses ``outer `inner' outer''

That's correct (`` and '' should be real 66 and 99 curly quotes).
Comment 14 Robin Lionheart 2000-10-01 15:54:58 PDT
Viewing the test case with build 2000093020, I note that the outer quotes are
used but the inner quotes are not.
Comment 15 buster 2000-10-06 10:45:57 PDT
P3 bugs will not make NS6 rtm.  Milestone ->Future.  There are two distinct
pieces of work that need to be done here.  First, the layout team (me!) needs to
remove troy's hard-coding of the quote character as described in an earlier
comment.  That's a very small amount of work.  Second, the I18N team needs to
spec out the quote semantics for all supported languages and add them to the
html.css style sheet.

cc-ing some I18N guys so they can add this to their NS6.0x release plans.  It
wouldn't hurt to write this up as a request for help to the I18N newsgroups, and
see if we can get some volunteers to research each of the interesting languages.
 I've already noticed some pretty detailed comments in this and related bugs.
It's be nice to merge all these comments into a single spec.
Comment 16 Frank Tang 2000-10-06 13:20:41 PDT
1. I don't think :lang(xx) is working yet. Pierre- Is that true ? When do we
plan to make it work ?
2. I think we should consider backward compatability also.
Comment 17 Henri Sivonen (:hsivonen) 2000-10-06 13:42:33 PDT
buster, Should information about different languages be added as comment to this bug 
or collected in some other way?

ftang, What do you mean by backward compatibility in this case? The <q> element is 
inherently incompatible with legacy browsers.
Comment 18 Karl Ove Hufthammer 2000-10-06 13:44:06 PDT
> 2. I think we should consider backward compatability also.

What do you mean?
Comment 19 Pierre Saslawsky 2000-10-06 15:04:25 PDT
The :lang pseudo is not implemented yet (look for "nsCSSAtoms::langPseudo" in 
nsCSSStyleSheet.cpp).
Comment 20 Tobias Burnus 2000-10-07 04:42:37 PDT
> There are two distinct pieces of work that need to be done here.  First, the
> layout team (me!) needs to remove troy's hard-coding of the quote character as
> described in an earlier comment.  That's a very small amount of work.
> Second, the I18N team needs to spec out the quote semantics for all supported
> languages and add them to the html.css style sheet.
I think those two parts are rather independend. You could remove the hard-coding
and add the same quote via html.css. The lang() part can be done later when it
is supported, but this wouldn't then requite step one.
(note: inner quotes don't work neither so there are more bugs than just the
hard-coding and the missing lang().)
lang() is bug 35768 so we may want to add a dependency.
Comment 21 Kevin McCluskey (gone) 2001-10-04 16:34:32 PDT
Build reassigning Buster's bugs to Marc.
Comment 22 Pierre Saslawsky 2001-10-19 04:19:41 PDT
This bug depends on bug 35768 which will soon be fixed.

Pay attention to performance if you apply fairly generic style rules in html.css 
as Ian suggested when he opened the bug.
Comment 23 Christopher Hoess (gone) 2001-10-20 10:55:04 PDT
<URL:http://www.evertype.com/alphabets/> contains an extensive collection of PDFs detailing orthography of European languages. Yiddish apparently uses characters 201C and 201E for its purposes (inline, anyway; book titles are often delimited by 201C and 201D, according to <URL:http://www.shoshke.net/yuyip/unicodechrt.htm>). I'm not familiar with Asian languages, or if they even have characters that correspond to these semantics.
Comment 24 Christopher Hoess (gone) 2001-10-23 11:17:54 PDT
*** Bug 106258 has been marked as a duplicate of this bug. ***
Comment 25 Jonadab the Unsightly One (Nathan Eady) 2001-11-28 21:45:45 PST
If this is done, there *needs* to be an easy way for users to 
disable it and get plain ASCII quotes.  This is vital for a 
significant minority of power users, for copy/paste operations 
in situations where esoteric characters (read: anything but 7-bit
ASCII) are not acceptable.  Besides, curly quotes just look very 
very wrong, to the point of being an extreme distraction, to some
few of us (mostly the same kind of old-timers who insist on a 
fixed-width font for email and usenet).  

How can I set my language environment to accept only ASCII 
characters?    

Comment 26 Christopher Hoess (gone) 2002-03-22 15:13:20 PST
Jonadab: your concerns would best be handled by a separate bug in the
DOM-to-text conversion component.  Note that the same issues could just as well
occur cut-and-pasting, say, a European name with an ISO-8859-1 character.
Comment 27 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2002-06-29 20:45:44 PDT
Taking those of attinasi's style system bugs that are really style system bugs
and still look valid.
Comment 28 Greg K. 2002-07-13 12:02:51 PDT
Reconfirmed using FizzillaCFM/2002071208. Setting All/All.

I think this depends on bug 24861.
Comment 29 Tobias Burnus 2002-08-15 13:34:43 PDT
Created attachment 95443 [details] [diff] [review]
Patch html.css for de, en, fr, it, nl and no
Comment 30 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2002-08-15 13:43:10 PDT
Comment on attachment 95443 [details] [diff] [review]
Patch html.css for de, en, fr, it, nl and no

de and nl should use "\201A" rather than ",", right?

The performance effect of these selectors (in particular, the middle one) is a
problem, although I see what you're trying to do.
Comment 31 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2002-08-15 13:48:44 PDT
For reference, http://www.unicode.org/charts/PDF/U2000.pdf contains information
about the characters used here.
Comment 32 Nicolás Lichtmaier 2002-08-15 14:16:57 PDT
For Spanish (es) would be the same as for US English (en):

It could be expressed this way:

:root:lang(en), [LANG|=en],    :lang(en)     > q ,
:root:lang(es), [LANG|=es],    :lang(es)     > q
{ quotes: "\201C"  "\201D" "\2018" "\2019" }
Comment 33 Greg K. 2002-08-15 14:34:02 PDT
Would there be any difference between European Spanish and Mexican or Latin
American Spanish?
Comment 34 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2002-08-15 15:32:46 PDT
The Spanish I learned in school used quotes like what's in the patch for de-ch,
except with the last two reversed.  (Was that order intentional?)  And I've
certainly seen books printed that way.

I don't know if I'm out of date or if it's a regional difference, although I can
say that http://www.abc.es/ (Spanish) seems to use a mix of quoting styles,
while all the other Spanish and Latin American newspaper sites I can find (see
http://www.library.upenn.edu/resources/news/newspapers/language/spanish-papers.html
) seem to use American-style quotes.  (Newspapers are good because they have
lots of quotes.)
Comment 35 Greg K. 2002-08-15 15:47:38 PDT
Actually, see comment 23 for a helpful URL about punctuation in European languages.
Comment 36 Karl Ove Hufthammer 2002-08-16 02:18:19 PDT
I now have updated information for the Norwegian quotation marks. These should use:

{ quotes: "\AB" "\BB" "\2018" "\2019"; }

(The marks I mentioned earlier are still sometimes used, but these are the most
common and preferred used.)

Note that these quotation marks should be used for *three* language codes, 'no',
'nn' and 'nb' (Norwegian consists of two official written languages, which has
separate ISO 639 language codes). To summarize, the following style rules should
be added/changed:

:root:lang(no), :lang(no) > Q { quotes: "\AB" "\BB" "\2018" "\2019"; }
:root:lang(nn), :lang(nn) > Q { quotes: "\AB" "\BB" "\2018" "\2019"; }
:root:lang(nb), :lang(nb) > Q { quotes: "\AB" "\BB" "\2018" "\2019"; }

(Feel free to combine them into one rule if that's better for performance.
Comment 37 Karl Ove Hufthammer 2002-08-16 02:24:03 PDT
Oh, by the way, the 'Q' in all the style rules should be changed to 'q', to
match the XHTML (served as 'application/xhtml+xml' or 'text/xml') element too.
I.e., change:

:root:lang(xx), :lang(xx) > Q

to

:root:lang(xx), :lang(xx) > q
Comment 38 Tobias Burnus 2002-08-16 06:20:48 PDT
Created attachment 95571 [details] [diff] [review]
v2: Updated patch; added es, es-es, nn and nb

I use now this type of selector:
  :lang(en),	:lang(en)     > q
This should take care of <blockquote> and <q>.
But maybe we could even dump the :lang() > q part since e.g. in German we use
for <q> the quotes from the language from being quoted - if one quotes a
complete sentence. (If only a (few) word(s) are quoted the quotes of the
surrounding text are used.) Don't know which case is more common.
(Now I understand why XHTML's <quote> doesn't automatically add quotation
marks)

http://www.evertype.com/ is not really helpful since it frequently states:
'single' and "double" quote without telling which comes in which order.

Further Changes: Added es (copied from de-ch), es-es (according to evertype);
nn , nb and no have now the new quotes from comment 36.

> The performance effect of these selectors is a problem
This will unfortunally become even worse as the number of supported languages
increases. A radical solution would be keep the current behaviour, add a note
to the release notes that one can put such selectors in one's user.css and let
the sites which use <q> take care of this, i.e. let them write appropriate
selectors.
Comment 39 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2002-08-16 08:40:53 PDT
Those selectors will also have performance issues.  I really can't think of a
good way to set a reasonable default for quotes on all elements so that we'll do
the right thing for open-quote and close-quote.  Doing the q element is easy
enough, though.  Perhaps just the first and third rules from your first patch
would be good enough?

I think the es-ES still has the wrong thing for the second pair, although styles
seem to be changing and the rule could probably be omitted altogether.

It's also conventional to write the country codes in uppercase, e.g., en-GB,
es-ES, etc.
Comment 40 Karl Ove Hufthammer 2002-08-16 09:24:08 PDT
Here's the correct quotation marks for Danish:

:lang(da), :lang(da) > q { quotes: "\BB" "\AB" "\203A" "\2039"; }
Comment 41 Greg K. 2002-08-16 11:46:10 PDT
Karl, out of curiosity, what reference are you using to determine these?
Comment 42 Henri Sivonen (:hsivonen) 2002-08-16 12:58:57 PDT
Finnish:
Outer left & right quotation mark: U+201D 
Inner left & right quotation mark: U+2019
Comment 43 Tobias Burnus 2002-08-16 13:10:13 PDT
> I think the es-ES still has the wrong thing for the second pair, although 
> styles seem to be changing and the rule could probably be omitted altogether.
I have no idea what they have to look like in Spanish actually (you usually see
only the first pair), but this is what
http://www.evertype.com/alphabets/spanish.pdf says. I can also remove es-es
altogether.

> It's also conventional to write the country codes in uppercase, e.g., en-GB,
> es-ES, etc.
Hmm. I thought that lowercase was more common (e.g. language preference in
Mozilla) and RFC 2616 (3.10+14.4) use lowercase. RFC 1766 uses "en-US". Should I
fill a bug to for changing the Mozilla preference?
Comment 44 Niklas Dougherty 2002-10-27 22:50:56 PST
Swedish:

:root:lang(sw), :lang(sw) > q { quotes: "”" "”" "’" "’" }

or (less common)

:root:lang(sw), :lang(sw) > q { quotes: "»" "»" "›" "›" }

This really sucks, but that is how it is...
Comment 45 Hixie (not reading bugmail) 2002-10-28 00:05:59 PST
Please give unicode code points, not actual characters, since Bugzilla is served
without a character set header and therefore it is impossible to tell what the
character is supposed to be.

Regarding the patch, why do we bother to set the 'quotes' property on the <q>
elements? 'quotes' is inherited, so if we just set it on :root and :lang(), we
should be ok, no?
Comment 46 Karl Ove Hufthammer 2002-10-28 02:09:09 PST
> since Bugzilla is served without a character set header

Is there a bug filed for this?
Comment 47 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2002-10-28 03:24:53 PST
Matching :lang() for every element in the document is likely to be slow, and
will also introduce an extra rule matching every single element. 
:-moz-different-lang() might not be so bad, and could be faster, although we'd
still have to attempt to match for every element.
Comment 48 Hixie (not reading bugmail) 2002-10-28 07:17:33 PST
well, only doing it on Q works for me too, although it seems kinda wrong. I
prefer the :-moz-different-lang() idea. My point really was just that we
shouldn't have _both_ Q _and_ * as the selectors.
Comment 49 Benoit 2003-05-21 06:00:18 PDT
The last patch seems incorrect for the french quotes. u2039 (like '<') and u203a
(like '>') are NOT used as nested quotes in french. In fact, french nested
quotes are just like double english quotes (see
http://listetypo.free.fr/ortho/guillemets.html (in french)). Note that the
testcase given in comment 5 as well as the example given in the CSS 2 
http://www.w3.org/TR/REC-CSS2/generate.html#quotes-insert are both wrong.

+:lang(fr), :lang(fr) > q { quotes: "\AB\2009" "\2009\BB" "\2039\2009" "\2009\203A"}

This line should be:
+:lang(fr), :lang(fr) > q { quotes: "\AB\A0" "\A0\BB" "\201C" "\201D"}

Well, maybe it would look better with a thin space (2009) instead of a
non-breaking space (A0) tough, since in HTML the latter seems justifiable where
it should not.

So it should really be:
+:lang(fr), :lang(fr) > q { quotes: "\AB\2009" "\2009\BB" "\201C" "\201D"}
Comment 50 Jo Hermans 2003-06-23 23:44:58 PDT
*** Bug 210457 has been marked as a duplicate of this bug. ***
Comment 51 dcary 2003-06-28 08:42:57 PDT
"how user agents should render quotation marks"
"it is customary to quote the text with the quote marks of the language of the
surrounding text, not the language of the quotation itself."
http://www.w3.org/TR/REC-CSS2/generate.html#quotes

in reply to comment #38
 Bug 16206#38
Comment 52 dcary 2003-06-28 09:31:59 PDT
Here's a crazy, crazy idea:

Some people prefer black text on a white background, while other people prefer
yellow text on a black background. Mozilla allows these all of these people to
get what they want.

By analogy:

Some people prefer &ldquo; left and right double quotes &rdquo;
while other people prefer &laquo; left and right guillemets &raquo;. Perhaps
Mozilla could allow all of those people to get what they want ?

(There's no need for yet another special "preferences" setting; Mozilla would
set the appropriate quote style automatically when the user changes the
"languages" settings).

The crazy idea is that a French-speaking Mozilla user would always see <q>quote
tags</q> rendered with guillemets, ignoring the language used by the web page's
author. (Is this what Mozilla should do when no LANG attribute or CSS occurs on
the web page ?)

p.s.: Bug 7954 depends on this bug (Bug 16206) because we need at least a
partial fix for full HTML 4 compliance --
see
http://www.w3.org/TR/html4/struct/text.html#h-9.2.2
Comment 53 Bill Mason 2003-07-23 16:48:08 PDT
*** Bug 213617 has been marked as a duplicate of this bug. ***
Comment 54 Jörg Hartmann 2003-07-24 10:41:11 PDT
In response to #51: No, W3C is wrong here (as it also gives us bad/false
examples of French and German quotation marks). #31 is more close to correct
typography.

Please don't read RECs and RFCs about that stuff but common typography books.

If a quote is an expression by itself, the marks accord to that quote (in
language). If it is only a part of an expression (sentence or the like), the
surrounding language counts.

This is common practice for centuries now. And even more it's just reasonable.
Comment 55 Jörg Hartmann 2003-07-25 07:33:40 PDT
This is wrong:
:lang(de-ch), :lang(de-ch) > q { quotes: "\AB" "\BB"  "\2039" "\203A" }
It should be: { quotes: "\BB" "\AB" "\203A" "\2039" }

This is nonsense:
:lang(nl), :lang(nl) > q { quotes: "\201E" "\2019" "\201A" "\201D" }
(Just look at the results.)
Comment 56 Jörg Hartmann 2003-07-27 14:13:31 PDT
I read trough the discussions on W3C. Although the examples by Bert Bos tell us
that :lang(xy) > q should be used because quotation marks would usually set up
according to the surrounding text's language rules, this is not only
semantically wrong (for quotes that are complete sentences, which I counted most
in various kinds of documents and books), it's also vialating the spec of the
<q> tag as it was ment by his i18n inventors.

Within the W3C discussion that went on while the <q> tag and the quotes:
property were created, it was clearly stated (by those who created/invented it)
that the standard case for <q></q> should be full-sentence-quotes and that <q
lang="xy"></q> should be synonymous for xy-style quotation marks. (And so
smaller-than-a-sentence quotes which are typically surrounded by quotation marks
as usual in the surrounding language would need usage of <q><span
lang="xy"></span></q> instead of <q lang="xy"></q>.)

So this means q:lang(xy) and (as long as the bug lives on) q q:lang(xy) would be
quite enough. (Inheritance is not vialated by assigning everything directly to
the q elements only.)

This would give us the following examples:
q:lang(cs), q:lang(nl), q:lang(pl), q:lang(ro) { quotes: "\201E" "\201D" "\201A"
"\2019" }
q q:lang(cs), q q:lang(nl), q q:lang(pl) { quotes: "\201A" "\2019" }
(That's what is usual in the Netherlands, among others. I guess this is also
true for some more languages, e.g. q:lang(sk).)

q:lang(de), q:lang(sr) { quotes: "\201E" "\201C" "\201A" "\2018" }
q q:lang(de), q q:lang(sr) { quotes: "\201A" "\2018" }

q:lang(de-ch), q:lang(de-it) { quotes: "\BB" "\AB" "\203A" "\2039" }
q q:lang(de-ch), q q:lang(de-it) { quotes: "\203A" "\2039" }

q:lang(en), q:lang(en-gb) { quotes: "\2018" "\2019" "\201C" "\201D" }
q q:lang(en), q q:lang(en-gb) { quotes: "\201C" "\201D" }

q:lang(en-us) { quotes: "\201C" "\201D" "\2018" "\2019" }
q q:lang(en-us) { quotes: "\2018" "\2019" }

q:lang(es), q:lang(nn) { quotes: "\AB" "\BB" "\2018" "\2019" }
q q:lang(es), q q:lang(nn) { quotes: }
(This is standard for all variants of Spanish and Nynorsk.)

q:lang(fi), q:lang(sv) { quotes: "\201D" "\201D" "\2019" "\2019" }
q q:lang(fi), q q:lang(sv) { quotes: "\2019" "\2019" }

q:lang(fr) { quotes: "\AB\2009" "\2009\BB" "\201C" "\201D" "\2018" "\2019" }
q q:lang(fr) { quotes: "\201C" "\201D" }
q q q:lang(fr) { quotes: "\2018" "\2019" }
(This is the official French way of quoting. The levels!!)

q:lang(it) { quotes: "\AB" "\BB" "\201C" "\201D" }
q q:lang(it) { quotes: "\201C" "\201D" }
(Not "\2039" "\203A"!)

q:lang(ja), q:lang(zh) { quotes: "\300C" "\300D" "\300E" "\300F" }
q q:lang(ja), q q:lang(zh) { quotes: "\300E" "\300F" }
(Does anyone know about Korean?)

q:lang(nb), q:lang(no), q:lang(ru) { quotes: "\AB" "\BB" "\2039" "\203A" }
q q:lang(nb), q q:lang(no), q q:lang(ru) { quotes: "\2039" "\203A" }
(The official Bokmål version. Also usual in Russian. Not in Italian!)

Just for a start ...

Could someone put this into an updated patch/attachment? Thanks.
Comment 57 Jörg Hartmann 2003-07-27 14:17:01 PDT
Sorry, vi_o_lated ... ;)
Comment 58 Jörg Hartmann 2003-07-27 14:20:26 PDT
Oops, for French I meant: "Three levels!" ...
Comment 59 Jörg Hartmann 2003-07-29 07:25:50 PDT
I was wrong: Czech does't use the Polish/Dutch but the German tradition. The
same seems true for Romanian, Slovak and Slovenian, which would give this:

q:lang(cs), q:lang(de), q:lang(ro), q:lang(sk), q:lang(sl), q:lang(sr) { quotes:
"\201E" "\201C" "\201A" "\2018" }
q q:lang(cs), q q:lang(de), q q:lang(ro), q q:lang(sk), q q:lang(sl), q
q:lang(sr) { quotes: "\201A" "\2018" }

q:lang(nl), q:lang(pl) { quotes: "\201E" "\201D" "\201A" "\2019" }
q q:lang(nl), q q:lang(pl) { quotes: "\201A" "\2019" }

Well, there should also be official national standards for these languages like
there are for Norway, Germany, Netherlands, France etc.
Comment 60 Jörg Hartmann 2003-07-30 18:19:28 PDT
Back again: According to a Romanian Grammar schoolbook it proved right as I
wrote in the first place, same way as in Poland and the Netherlands (which have
official national standards):

q:lang(nl), q:lang(pl), q:lang(ro) { quotes: "\201E" "\201D" "\201A" "\2019" }
q q:lang(nl), q q:lang(pl), q q:lang(ro) { quotes: "\201A" "\2019" }

And while the German curved tradition is valid in Slovenia, the
Swiss-German/Italian-German (Tiroler) tradition (Guillemets pointing inwards) is
more common there, so it's:

q:lang(de-ch), q:lang(de-it), q:lang(sl) { quotes: "\BB" "\AB" "\203A" "\2039" }
q q:lang(de-ch), q q:lang(de-it), q q:lang(sl) { quotes: "\203A" "\2039" }

And (all proven), whereas Serbian means only the Kyrill version (the Latin is
sr@Latn and uses the French way but without spaces):

q:lang(cs), q:lang(de), q:lang(sk), q:lang(sr) { quotes: "\201E" "\201C" "\201A"
"\2018" }
q q:lang(cs), q q:lang(de), q q:lang(sk), q q:lang(sr) { quotes: "\201A" "\2018" }
Comment 61 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2003-10-30 16:12:30 PST
*** Bug 144853 has been marked as a duplicate of this bug. ***
Comment 62 Alexey Chernyak 2004-05-30 10:46:11 PDT
Well, both blockers for this bug have been fixed, so there's nothing stopping
this from being implemented now.
This page may be a very useful reference point for various languages:
http://en.wikipedia.org/wiki/Quotation_mark

This may help with differences of nested quotations between American and British:
http://www.grammartips.homestead.com/quotationmarks.html

(In reply to comment #49)
> The last patch seems incorrect for the french quotes. u2039 (like '<') and u203a
> (like '>') are NOT used as nested quotes in french. In fact, french nested
> quotes are just like double english quotes (see
> http://listetypo.free.fr/ortho/guillemets.html (in french)). Note that the
> testcase given in comment 5 as well as the example given in the CSS 2 
> http://www.w3.org/TR/REC-CSS2/generate.html#quotes-insert are both wrong.

As I understand in some languages there may be alternative quotation marks used
for handwriting that difer from typographic quotes, so let's be very careful not
to confuse 2 different styles.

(In reply to comment #51)
> "how user agents should render quotation marks"
> "it is customary to quote the text with the quote marks of the language of the
> surrounding text, not the language of the quotation itself."
> http://www.w3.org/TR/REC-CSS2/generate.html#quotes

CSS 2.1 no longer makes such recommendation:
http://www.w3.org/TR/CSS21/generate.html#quotes

I think this should be specific to the rules of host language, so different
languages would have different CSS selectors used.

But I personally lean towards q:lang(xy) being used as selector to avoid any
slowness. Authors can always provide their preferred quotation rules through CSS
- à la XHTML 2.0 <quote> - if they don't like Mozilla rendering.
Comment 63 Benoit 2004-05-31 09:16:40 PDT
(In reply to comment #62)
> > The last patch seems incorrect for the french quotes. u2039 (like '<') and u203a
> > (like '>') are NOT used as nested quotes in french. In fact, french nested
> > quotes are just like double english quotes (see
> > http://listetypo.free.fr/ortho/guillemets.html (in french)). Note that the
> > testcase given in comment 5 as well as the example given in the CSS 2 
> > http://www.w3.org/TR/REC-CSS2/generate.html#quotes-insert are both wrong.
> 
> As I understand in some languages there may be alternative quotation marks used
> for handwriting that difer from typographic quotes, so let's be very careful not
> to confuse 2 different styles.
That comment was from me. The link I gave is of course about typographical
quotes (see "listetypo" in the address). 

An alternative way /may/ be used with handwriting in some regions, but none that
I know of looks like the example given above. And I should be more aware of that
since I'm from Belgium and not from France, so I know more about the little
differences that may exist between french-speaking countries. In fact, I've
never seen single chevrons used anywhere in French, only double "guillemets",
which makes me wonder why they are called "french" at all :)

Anyway, from your wikipedia article: "[In French,] English quotes are also used
for nested quotations, as American English uses single quotes", and an example
follows.
Comment 64 David Feuer 2004-11-22 21:05:20 PST
People worried about performance for multiple language selectors should probably
think about optimizing language selectors in CSS implementation, not about
quoting.  Separate issues.  Don't mess up quoting to hide inefficiency elsewhere.
Comment 65 Allan Sandfeld 2005-02-25 02:19:30 PST
For danish we use lower 66 quotes for start-quotation and upper 99 (201D) for 
end-quotation. I can't remember the rules for embedded quotations. For some 
silly reason unicode have not included a lower 66 quote yet.  
 
As a stop gap we could use lower 99 (201e) or upper reversed-99  (201f) or 
upper 66 (201c).  
 
I should also not that in Konqueror we so far just stick to the CSS 
recommandations of using "quotes: "\"" "\"", but since it is only Opera and 
Konqueror that so far have been supporting quotes no one are actually using 
them. We welcome Mozilla 1.8 to join the club ;) 
Comment 66 Simon Montagu :smontagu 2005-03-23 00:45:42 PST
*** Bug 287299 has been marked as a duplicate of this bug. ***
Comment 67 Doug Wright 2005-07-13 08:04:30 PDT
*** Bug 300621 has been marked as a duplicate of this bug. ***
Comment 68 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2005-08-15 20:00:04 PDT
*** Bug 304762 has been marked as a duplicate of this bug. ***
Comment 69 Simon Montagu :smontagu 2006-05-16 00:37:29 PDT
*** Bug 338056 has been marked as a duplicate of this bug. ***
Comment 70 Adam Guthrie 2006-09-26 13:25:23 PDT
*** Bug 354356 has been marked as a duplicate of this bug. ***
Comment 71 Tom 2006-11-26 03:26:15 PST
Hey Dave,
shouldn't this "senior" bug be reconsidered and changed its target to 1.9?
Now, when FF supports spell-check feature, it'd be a logical step to improve FF's support of grammar. Yes, I'm talking about opening and closing question marks support within textfields, see the Basic Latin Unicode chart (http://www.unicode.org/charts/PDF/U0000.pdf)for example, plus respecting language specificities.
Comment 72 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2006-11-26 03:49:08 PST
This bug has nothing to do with textfields.
Comment 73 Simon Montagu :smontagu 2007-02-19 12:14:01 PST
*** Bug 370932 has been marked as a duplicate of this bug. ***
Comment 74 Rimas Kudelis 2007-02-19 12:26:37 PST
Is anyone working on this? Nested quotations look really weird currently. I was translating a press-release for Mozilla today, and I used quoted names, like „Mozilla“ inside a <q> element. The result looks really weird in Firefox.

For reference: in Lithuanian, quotes are „like this“. Inner quotes are like that too, I believe.
Comment 75 petr.pisar 2007-03-12 12:11:52 PDT
Created attachment 258331 [details] [diff] [review]
 v3: Updated patch; added cs
Comment 76 Frans de Jonge 2007-07-11 05:14:16 PDT
In that v3 attachment, the values for Dutch are wrong for sure. They should be:

"\201E" "\201D" "\201A" "\2019"
Comment 77 Marek Stępień [:marcoos, inactive] 2007-07-11 05:27:12 PDT
For Polish (which is missing from this patch) comment #60 is formally correct, but there are three styles of quoting in Polish (see http://pl.wikipedia.org/wiki/Cudzys%C5%82%C3%B3w), of which the second one is more common, though.

So, for Polish I would suggest:

q:lang(pl) { quotes: "\201E" "\201D" "\00AB" "\00BB" }

which should render as:

„Cytat «wewnątrz» cytatu”
Comment 78 John Drinkwater (:beta) 2008-02-10 14:08:16 PST
(In reply to comment #75)
> Created an attachment (id=258331) [details]
>  v3: Updated patch; added cs
> 

As far as I can guide you, those lang(en) entries should only be for lang(en-us),  en-us is but one of the dialects of English, and their quotation preference shouldn’t be inherited by the rest.
Comment 79 Rimas Kudelis 2008-07-29 12:04:18 PDT
Could we have this by 3.1? Or maybe even by 3.0x?

I could probably even combine a patch using the info in the comments here...
Comment 80 Zack Weinberg (:zwol) 2008-08-12 17:38:42 PDT
Created attachment 333483 [details] [diff] [review]
alternative patch (Jörg Hartmann's approach)

This alternative patch takes Jörg Hartmann's approach of setting the property directly on q (and blockquote) tags rather than the :lang > q approach favored by others.  I find the argument in comment 56 compelling.  Hartmann's lists of rules appear to be a superset of those in attachment 258331 [details] [diff] [review].  I used them, plus corrections by later posters.  It does not appear to be necessary to include "q q:lang(foo)" rules anymore.

This is, of course, not a comprehensive set of rules.  I wonder if it would be possible to get assistance from our localization teams for this - unfortunately, absent cleverness in the core, all this stuff does have to wind up in html.css, so it won't fit into their existing workflow.

Note that if you don't have the patch for bug 389406 in your tree, one hunk of this patch will fail to apply; this is harmless.  All the significant changes are to html.css.
Comment 81 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2008-08-12 19:00:27 PDT
I don't think we should do this unless there's a cross browser spec for the desired behavior with commitments from other vendors to implement as well.  I'd also prefer not to do it at all because of performance and complexity.
Comment 82 Rimas Kudelis 2008-08-12 23:14:13 PDT
(In reply to comment #80)
> This is, of course, not a comprehensive set of rules.  I wonder if it would be
> possible to get assistance from our localization teams for this -
> unfortunately, absent cleverness in the core, all this stuff does have to wind
> up in html.css, so it won't fit into their existing workflow.

It should be fairly easy. You (or I) can announce on mozilla.dev.l10n that some help is needed (or cc Pike on this bug and ask his help in spreading the word).

(In reply to comment #81)
> I don't think we should do this unless there's a cross browser spec for the
> desired behavior with commitments from other vendors to implement as well.  I'd
> also prefer not to do it at all because of performance and complexity.

We shouldn't do what exactly? I don't think some language matching would significantly degrade our performance or make html.css too complex. Instead, it would just make quotes look nicer for non-en-US texts.
Comment 83 Samuel Sidler (old account; do not CC) 2008-08-18 00:31:09 PDT
Not wanted for 1.9.0.x.
Comment 84 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2008-10-29 15:56:17 PDT
(In reply to comment #82)
> We shouldn't do what exactly? I don't think some language matching would
> significantly degrade our performance or make html.css too complex. Instead, it
> would just make quotes look nicer for non-en-US texts.

It doesn't do authors any good to have better language-dependent defaults in some browsers; it only helps if they're present in all browsers.  Otherwise authors are better off just avoiding the Q element or specifying the 'quotes' property themselves.

So unless there's a standard for what the defaults should be that will be implemented across browsers, we shouldn't fix this bug.  We certainly shouldn't "refine" the values from release to release, since that would cause even more confusion for authors.

Marking WONTFIX (although given comment 0, FIXED might actually be more appropriate).

Note You need to log in before you can comment on or make changes to this bug.