HunSpell dictionary code page?

Hi there,  .NET 6.0, Syncfusion 19.3.0.57, I am trying to load a Hunspall dictionary to SpellChecker. It says

Message=An item with the same key has already been added. Key: �

This seems to me a codepage issue. This is the hunSpell dict from LibreOffice. It is UTF-8.

If I convert it to Unicode, it loads nicely but has no effect. Spellchecker still checks in English.

_pathResources = Path.Combine(_pathStartup, "Resources");
CultureInfo culture = new CultureInfo("hu-HU");
_spellChecker.Dictionaries = new DictionaryCollection
{
new HunspellDictionary
{
Culture = culture,
GrammarUri = new Uri(Path.Combine( _pathResources, "hu_HU.aff" ), UriKind.Absolute),
DictionaryUri = new Uri(Path.Combine( _pathResources, "hu_HU.dic" ), UriKind.Absolute),
},
};
_spellChecker.Culture = culture;
SfSpellChecker.SetSpellChecker(TextEditor, _spellChecker);

3 Replies

SN Sudharsan Narayanan Syncfusion Team December 15, 2021 03:28 AM UTC

Hi Gyorgy,

We have checked the reported query that “Hunspell code throws message” from our end. We are unable to reproduce the reported issue and the culture words in dictionary are working fine when we spell check. So, please find the sample from the below sample,

Sample: https://www.syncfusion.com/downloads/support/forum/171166/ze/HunSpellCheck734645495

Please check the above sample and let me know. If we misunderstood the query or issues, Please modify the sample with issue reproducible and share the same. So, it will be helpful for provide you the solution as earliest.

Regards,
Sudharsan



GG Gyorgy Gorog December 17, 2021 04:45 PM UTC

Sudharsan, please close this thread to avoid confusion, as you justly put it :)

BTW  dictionaries must be in UTF-8 as I found out.



SN Sudharsan Narayanan Syncfusion Team December 21, 2021 04:20 AM UTC

Hi Gyorgy,

Please let us know if you need further assistance. As always, we are happy to help you out. 

Regards,
Sudharsan


Loader.
Up arrow icon