Closed Bug 237344 Opened 17 years ago Closed 15 years ago
Contractions not recognized by spelling checker when real apostrophe character used
When using a +ve contraction (e.g., we've) and a real apostrophe character (U+2019) instead of a foot mark (U+0027), the spelling checker fails to recognize the contraction. All other contractions (+s, +ll, +t, +re, +m and +d) are apparently recognized when using either symbol. To reproduce: Create a new e-mail message and type in "we've we’ve" (using the real apostrophe in the second word) 2. Check spelling Actual results: Spelling checker flags the second instance of "ve" as a word by itself Expected results: Spelling checker should show no misspellings.
this appears to be a dup of 218463, but I don't have permissions to change it's status...
This is about catching misspellings, the other is about suggestions.
This appears to be because s, ll, t, re, m and d all pass spell-checking as individual words. "we値l" is checked as two separate words.
This has two parts. The change to mozEnglishWordUtils.cpp ensures that a U2019 apostophe is included as part of a word. But changing this on its own means that the part of the word after the apostrophe is never spell-checked, because the text is transformed into ISO8859-1 and the apostrophe is an illegal character. So either Unicode apostrophes would need to be replaced with ASCII apostrophes in a copy of the source text, or, as here, I changed the character set to CP1252 so that the apostrophe character can be represented. This would need the dictionaries to be updated, the patch includes only "we’ve" as a demonstration. If this approach is approved then I could go through the dictionary in full.
Instead of changing myspell, i'd rather change ’ to ' before calling myspell. Then you don't have to maintain your own version of the dictionary and don't have to have two copies of one word in the dict.
Comment on attachment 171546 [details] [diff] [review] Proposed patch (partial - changes dictionary but only adds "we’ve" as a demonstration) OK, withdrawing review request.
> Instead of changing myspell, i'd rather change ’ to ' before calling myspell. > Then you don't have to maintain your own version of the dictionary and don't > have to have two copies of one word in the dict. On the other hand, if we change the dictionaries, then we can internationalise the change easily. Changing ` to ' in the code may be too Anglocentric.
This is already fixed in a patch I'm working on for one of the other spellcheck bugs (which one I'm not sure because it fixes many).
Assignee: nobody → brettw
OS: Mac OS X 10.2 → All
Priority: -- → P1
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.8.1beta1
Version: Trunk → 1.8 Branch
Summary: +ve contractions not recognized by spelling checker when real apostrophe character used → Contractions not recognized by spelling checker when real apostrophe character used
Brett, does your patch also fix issues with other "typographic" symbols, or should I file another bug on that? E.g., using a real em-dash (U+2014) without spaces flags the entire word-em-dash-word as one misspelled word where using the equivalent -- does not. Bob--the fastest man in the universe--still lost the race. <--fine Bob—the fastest man in the universe—still lost the race. <-- flags Both this and Greg's original issue are all the more glaring on Mac OS X, where the system spellchecker correctly treats (U+2019) and (U+0027) as identical and treats -- and (U+2014) as identical; it joins elements separated by the former pair and splits elements separated by the latter when spell-checking. :(
This was fixed by bug 339478.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.