+3
Naprawione

Spell checker handling of accented characters

grumpus 13 lat temu Ostatnio zmodyfikowane przez Jon Skinner 12 lat temu 3

Sublime Text 2 allows the user to add a new spelling dictionary. For example: to install a Polish dictionary on a Mac, you can download a MySpell dictionary and unzip the files (pl_PL.aff and pl_PL.dic) it into the following path: 

~/Library/Application Support/Sublime Text 2/Packages/Language - Polish


The spell checker can then be activated by selecting from the View > Dictionary menu.


Unfortunately the spell checker can only handle words without any accented (extended Latin) characters. 


Any word with such a character is considered to be misspelled and is underlined.


In order for the spell checker functionality to make sense, this bug must be fixed. 

Odpowiedź

Odpowiedź
Naprawione

Some documentation was recently added on how to handle this, at http://www.sublimetext.com/docs/2/spell_checking.html


In short, Sublime Text 2 supports UTF-8 encoded dictionaries only, and you should be good to go if you convert your dictionary to UTF-8.

Odpowiedź
Naprawione

Some documentation was recently added on how to handle this, at http://www.sublimetext.com/docs/2/spell_checking.html


In short, Sublime Text 2 supports UTF-8 encoded dictionaries only, and you should be good to go if you convert your dictionary to UTF-8.

Hello, I recently tried this and tried converting a Swedish dictionary to UTF-8 to no avail. When I looked into the bundled UK English and US English dictionaries I saw that they are encoded in ISO8859-1, not UTF-8.

Turns out the bundled en_US.dic and en_UK.dic spell checks fail on words with accented characters, like Föhn, Göteborg, smörgåsbord, Velásquez, even though said words are included in the dictionaries. Changing the encoding of the dics and the SET parameter of the .aff file to UTF-8 does not fix the issue. Seems to me that the bug is not fixed, or am I doing something wrong?
 
What Jonatan mentioned also still applies to the German dictionary. All words with umlauts (ä ö ü ß) are underlined as incorrect and not recognized, regardless of the encoding. Unless I'm overlooking something, this bug is still in the latest build (2181).
I tried it and it works, I just opened the *.dic as well as the *.aff File in Sublime Text 2 clicked "Reopen with encoding" -> "UTF-8" saved it with another name and it works.