marcoagpinto / aoo-mozilla-en-dict

English Dictionaries Project (AOO+Mozilla+others)
163 stars 24 forks source link

Firefox trys to spell check non-English words, e.g. Chinese, when using en-GB dictionary #21

Closed hrzhu closed 8 years ago

hrzhu commented 8 years ago

I don't have this problem when using the American dictionary installed with Firefox. I don't know if it's the correct way to doing this, but changing SET UTF-8 to SET ISO8859-1 in en-GB.aff solves the problem. I notice the en-us dictionary in this repo also use SET UTF-8 while the en-us dictionary on my system use SET ISO8859-1. Is there any drawback if I change UTF-8 to ISO8859-1 and/or why should we use UTF-8 in this case?

marcoagpinto commented 8 years ago

It is easy to explain: when you activate a dictionary, it will compare all words being written with the ones in the wordlist. The spell checker does not know the real language being used as only humans do.

What I advice you to do is to disable spell checking while writing in Chinese or activate the Chinese dictionary if there is one.

See in this URL image how to uncheck the "Check Spelling": http://marcoagpinto.cidadevirtual.pt/dictionaries-installing/en-mozilla_5.png

UTF-8 must be used since it is the accept standard in all OSes.

marcoagpinto commented 8 years ago

Try also the add-on by Daniel Naber: https://addons.mozilla.org/en-US/firefox/addon/automatic-dictionary-switcher/

hrzhu commented 8 years ago

I read from the readme that you also maintain these dictionaries for LibreOffice. The problem is LibreOffice use myspell for spell checking and it does NOT support multi-byte characters. SET ISO8859-1 in affix file is required. You can read more info here.

Firefox uses hunspell, an improved mysell supports UTF-8. But English can be represented in single byte character set and processing single byte character set might be much efficient. Mozilla use ISO8859-1 for its en-US dictionary. source

Also check this. It says that the .dic and .aff files are normally in the encoding most appropriate for that language, which is unfortunately not usually UTF-8. UTF-8 is not required and probably not appropriate for English.

Anyway, I'll change to ISO8859-1 for now. It solves my problem. :smile:

hrzhu commented 8 years ago

Sorry, the first link is about OpenOffice. It may not apply to LibreOffice.