Closed
Bug 1200186
Opened 9 years ago
Closed 9 years ago
Fix spell checker so it can handle websites which specify the document/element language in lower case.
Categories
(Core :: Spelling checker, defect)
Core
Spelling checker
Tracking
()
RESOLVED
FIXED
mozilla43
People
(Reporter: mark, Unassigned)
References
(Blocks 1 open bug)
Details
While fixing up the spell checker dictionary logic, it became clear that the spell checking dictionary check is case sensitive, which regularly doesn't work if websites have languages specified in lower case (a common occurrence).
The spellchecker should make a case-insensitive check for language specified to match a dictionary to the element/document language.
See also: See https://bugzilla.mozilla.org/show_bug.cgi?id=1073840#c34
Reporter | ||
Updated•9 years ago
|
Summary: Fix spell checker so it can handle websites which specify the dictionary in lower case. → Fix spell checker so it can handle websites which specify the document/element language in lower case.
Comment 1•9 years ago
|
||
Will be fixed as part of bug 1200533.
Take a look at attachment 8656398 [details] [diff] [review], there we have now:
// Before we start, let's correct any problems due to non-matching case.
int32_t i, dictCount = dictList.Length();
for (i = 0; i < dictCount; i++) {
nsAutoString dictStr(dictList.ElementAt(i));
if (dictName.Equals(dictStr, nsCaseInsensitiveStringComparator())) {
dictName.Assign(dictStr);
printf ("***** Corrected dictName to |%s|\n", NS_ConvertUTF16toUTF8(dictName).get());
break;
}
}
Comment 2•9 years ago
|
||
BTW the current behaviour is *incorrect* standards-wise.
RFC 5646, section 2.1.1. Formatting of Language Tags
At all times, language tags and their subtags, including private use
and extensions, are to be treated as case insensitive: there exist
conventions for the capitalization of some of the subtags, but these
MUST NOT be taken to carry meaning.
Thus, the tag "mn-Cyrl-MN" is not distinct from "MN-cYRL-mn" or "mN-
cYrL-Mn" (or any other combination), and each of these variations
conveys the same meaning: Mongolian written in the Cyrillic script as
used in Mongolia.
http://www.ietf.org/rfc/bcp/bcp47.txt
RFC 1766, 2. The Language tag
NOTE: The ISO 639/ISO 3166 convention is that language names are
written in lower case, while country codes are written in upper case.
This convention is recommended, but not enforced; the tags are case
insensitive.
Comment 3•9 years ago
|
||
Good to know, thanks!
We'll fix it.
Updated•9 years ago
|
Updated•9 years ago
|
Blocks: spell-lang-change
Comment 4•9 years ago
|
||
Fixed as part of bug 1200533.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•