<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - window.navigator.language incorrectly returns all lowercase string"
href="https://bugs.webkit.org/show_bug.cgi?id=163096#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - window.navigator.language incorrectly returns all lowercase string"
href="https://bugs.webkit.org/show_bug.cgi?id=163096">bug 163096</a>
from <span class="vcard"><a class="email" href="mailto:cdumez@apple.com" title="Chris Dumez <cdumez@apple.com>"> <span class="fn">Chris Dumez</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=163096#c3">comment #3</a>)
<span class="quote">> As per
> <a href="https://developer.apple.com/reference/corefoundation/1666963">https://developer.apple.com/reference/corefoundation/1666963</a>-
> cflocale?language=objc , CFLocale is using BCP-47 language tags. Our Mac
> implementation is relying on CFLocaleCopyPreferredLanguages() which does
> return BCP-47 language tags.
>
> However, we then call httpStyleLanguageCode() on them which alters their
> format (and lower cases them).</span >
The name of this function seems to indicate this formatting is used for HTTP. However, RFC 2616 says:
"""
3.10 Language Tags
A language tag identifies a natural language spoken, written, or otherwise conveyed by human beings for communication of information to other human beings. Computer languages are explicitly excluded. HTTP uses language tags within the Accept-Language and Content- Language fields.
The syntax and registry of HTTP language tags is the same as that defined by RFC 1766 [1]. In summary, a language tag is composed of 1 or more parts: A primary language tag and a possibly empty series of subtags:
language-tag = primary-tag *( "-" subtag )
primary-tag = 1*8ALPHA
subtag = 1*8ALPHA
White space is not allowed within the tag and all tags are case- insensitive. The name space of language tags is administered by the IANA. Example tags include:
en, en-US, en-cockney, i-cherokee, x-pig-latin
where any two-letter primary-tag is an ISO-639 language abbreviation and any two-letter initial subtag is an ISO-3166 country code. (The last three tags above are not registered tags; all but the last are examples of tags which could be registered in future.)
"""
<a href="https://www.ietf.org/rfc/rfc1766.txt">https://www.ietf.org/rfc/rfc1766.txt</a> says that language tags are case insensitive so the fact that we no longer return lowercase would not break HTTP use-cases.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>