Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Spellchecker Issues
stahta01:
--- Quote from: raynebc on March 27, 2015, 08:23:14 pm ---
--- Quote from: oBFusCATed on March 11, 2015, 08:23:48 pm ---I think, I've never seen this. :(
--- End quote ---
Thinking about this some more since, does Code::Blocks use different dictionaries based on the detected language of the environment (ie. Windows' locale)?
--- End quote ---
IIRC, CB has a settings that picks the dictionary used by the spell checker.
But, the character encoding used by the OS/file might be causing the problem based on what I read on this board somewhere.
No idea if the default OS character encoding has any possibility of causing the issue.
Tim S.
oBFusCATed:
--- Quote from: raynebc on March 27, 2015, 08:23:14 pm ---Thinking about this some more since, does Code::Blocks use different dictionaries based on the detected language of the environment (ie. Windows' locale)?
--- End quote ---
As far as I could understand the code:
1. Every dictionary is stored in its own encoding
2. The encoding is not utf8, but some language specific (probably to safe some space)
3. CB tries to convert the words from the encoding it has detected for the file to the encoding used by the dictionary, or vice versa. This is done in order to find matching words.
4. I doubt that the system encoding has anything to do with this process.
janissl:
--- Quote from: oBFusCATed on March 28, 2015, 01:38:09 am ---1. Every dictionary is stored in its own encoding
2. The encoding is not utf8, but some language specific (probably to safe some space)
3. CB tries to convert the words from the encoding it has detected for the file to the encoding used by the dictionary, or vice versa. This is done in order to find matching words.
4. I doubt that the system encoding has anything to do with this process.
--- End quote ---
No, there must be another cause. For example, the Latvian dictionary is stored in UTF-8 with no BOM (see hunspell_lv.png in the attachment). The source file is also using the UTF-8. Even changing all words to the nominative case as they appear in the .dic file does not help to get rid of the curly red underlines.
I guess, some specific characters are causing this behaviour for some reason (see lv_strings_false_misspelled.png in the attachment). In addition, some words are underlined partly.
My default system encoding is Windows-1257 and the codepage for the Windows Command Prompt is 775 (the default Windows settings for the Baltic languages) but I think the Code::Blocks should not use those two encodings in any way if I have set explicitly the UTF-8 for the "Use encoding when opening files" option.
Playing with options in Editor Settings (checking-unchecking checkboxes and radio buttons under Encoding) did not change anything in the false error detection.
janissl:
However, the correct place to discuss the SpellChecker issues is the forum for plugins development: http://forums.codeblocks.org/index.php/topic,11307.0.html...
oBFusCATed:
The encoding for a particular dictionary is specified in the .aff file.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version