Zinggi / DictionaryAutoComplete

This adds dictionary entries to the completions inside comments. For lazy typers!
Other
94 stars 19 forks source link

Hunspell UTF8 dictionaries not supported? #13

Closed ghost closed 9 years ago

ghost commented 9 years ago

dictionaries baring appended endings such as /S , /M , /DGS , /GS dont seem to be supported. Words that are appended place a CR at the end of the words. Is there a way to fix this? the dictionary used in this case is titoBouzout/Dictionaries

Zinggi commented 9 years ago

Which file is causing problems, exactly? I thought it ignores whatever comes after a /, If I remember correctly. Do you have:

{
    "encoding": "UTF-8"
}

in your 'Preferences' -> 'Package Settings' -> 'DictionaryAutoComplete' -> 'Settings User'?

ghost commented 9 years ago

Hi thanks for the reply,

yes i am using "encoding": "UTF-8” just to clarify when autocomplete finds a word with an ending appended (/SM or /M) it does not add the lineend [CR] however "clean" words get this [CR] appended. please see the picture. i can't attach the dictionary file but it can be dowloaded from https://github.com/titoBouzout/Dictionaries/archive/master.zip the file is English (British).dic - https://github.com/titoBouzout/Dictionaries/blob/master/English%20(British).dic

sublimedic

On 29 Dec 2014, at 21:59, Florian Zinggeler notifications@github.com wrote:

Which file is causing problems, exactly? I thought it ignores whatever comes after a /, If I remember correctly. Do you have:

{ "encoding": "UTF-8" } in your 'Preferences' -> 'Package Settings' -> 'DictionaryAutoComplete' -> 'Settings User'?

— Reply to this email directly or view it on GitHub https://github.com/Zinggi/DictionaryAutoComplete/issues/13#issuecomment-68302326.

Zinggi commented 9 years ago

I'm taking a stab in the dark here, but I think this might happen because I'm splitting the file based on \n characters which isn't the correct cross platform way of doing it. So I replaced all the .split('\n') by .splitlines() and hope this fixes the problem. Try if this fixes the problem for you.

Zinggi commented 9 years ago

For reference, here's the commit https://github.com/Zinggi/DictionaryAutoComplete/commit/5bc8a19e686ee68fe32db66d9027a2d2ea2ad106

Zinggi commented 9 years ago

Did that actually work? Then I could close this.

Zinggi commented 9 years ago

Closing for inactivity. Please reopen if this is still relevant.