typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.53k stars 58 forks source link

Spell check fails when a word contains an accented letter #1895

Closed martin-grand closed 5 years ago

martin-grand commented 5 years ago

I think it's an encoding issue. I have tried the Hungarian spell check, and every word that contains at least one accented letter is underlined.

abnerlee commented 5 years ago

What's your operation system, could you give a sample md file or content in Hungarian?

martin-grand commented 5 years ago

I'm using Windows 7. Try with this sentence:

Az ember komolysága azon a határon kezdődik, hogy mi az, amit meg lehet neki mondani.

This is 100% correct for Microsoft Word's spell checker, but in Typora it has 5 hints under Hungarian spell checking.

abnerlee commented 5 years ago

We use dictionary https://github.com/typora/dictionaries/blob/master/dictionaries/hu/index.dic?raw=true seems some words are missing from the dict.

martin-grand commented 5 years ago

I think the main problem is in the encoding because this file has a lot of character what the Hungarian language is not containing. For example "Ăźvegfal" is wrong, the correct one is "Üvegfal", so the accented letters like Ü is written like "Ăź". I have found a correct encoded original file here: https://sourceforge.net/p/apertium/svn/48853/tree/incubator/apertium-hun/dev/hu_HU.dic

abnerlee commented 5 years ago

I see, so if you download the hu_HU.dic and hu_HU.u8.aff from https://sourceforge.net/p/apertium/svn/48853/tree/incubator/apertium-hun/dev, then rename hu_HU.u8.aff to hu_HU.aff, and them put them to C:\Users{username}\AppData\Roaming\Typora\dictionaries\ would it be fixed?

martin-grand commented 5 years ago

It's much better, accented words have been started to work. (not with hu_HU, but with hu) Otherwise, this library seems not too smart as I see. A ton of words is not recognized. :(

abnerlee commented 5 years ago

using https://sourceforge.net/p/apertium/svn/48853/tree/incubator/apertium-hun/dev in our dictoinaries site now.

https://github.com/typora/dictionaries/commit/b4a63e9fcaac27f5b67843045e414a555811a456