W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2008

Problem with q values in Accept-Language

From: Mark Davis <mark.davis@icu-project.org>
Date: Tue, 6 May 2008 19:31:43 -0700
Message-ID: <30b660a20805061931k18336f65l52e6363af276090b@mail.gmail.com>
To: ietf-http-wg@w3.org
Unfortunately, the spec is ill-defined regarding the q values, as used in
Accept-Language (http://tools.ietf.org/html/rfc2616#section-14.4).

1. Take the following example, where a..g stand for languages:

a, b;q=0.7, c, d;q=0.5, e, f;q=0.9, g

The specs do not distinguish between at least two different possible
reasonable interpretations of what the q values of c, e, and g are:

   1. c;q=1.0, e;q=1.0, g;q=1   // always 1
   2. c;q=0.7, e;q=0.5, g;q=0.9 // always same as previous

Our guess is that the user meant #2, but it is only a guess.

2. And even once that ambiguity is cleared up, nobody knows what the meaning
of the numbers really is. My native tongue is English, I can understand
Swiss German and German, my French is rusty, and Italian basic. Which of
these should I use?

   1. en;q=1, gsw;q=0.9,  de;q=0.9,  fr;q=0.8,  it;q=0.7
   2. en;q=1, gsw;q=0.5,  de;q=0.4,  fr;q=0.3,  it;q=0.2
   3. en;q=1, gsw;q=0.99, de;q=0.95, fr;q=0.03, it;q=0.02

All are descending order, but depending on what algorithm the consumer of
the tags uses, they could have far different results. Without being able to
have any consistent expectations for what the q numbers mean, producers of
tags don't know what settings to provide or what difference it will make,
and consumers of tags don't know what the producers meant, in order to meet
any expectations.

Received on Wednesday, 7 May 2008 02:32:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:10:45 UTC