Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: eckard_klotz on November 19, 2015, 06:43:31 am

Title: Issue with Spellchecker and German Umlauts
Post by: eckard_klotz on November 19, 2015, 06:43:31 am
Hello Everybody.

Even I'm a German I write my most projects in English, where this problems do not occur that's why I never noticed it. But now I started a small project with German comments to teach my nephew programming and there I faced a similar problem but with out a crash (may be a hang on Ubuntu 15.10 but not on Win 8.1 and Win 7 32 bit)

I attach my default.conf (Win 8.1) in the hope that you can check my adjustments and the mentioned project (Win 8.1) as zip-file. In this archive you will find a screen shot also.

When I tested it out this morning on Ubuntu I faced the fact that C::B freezed while opening the project and I had to close it again. After deleting the layout-file and the depend file I was able to open the project. Note I copied my project content from my Win 8.1 computer to my Ubuntu computer. Thus this effect may be caused by this transfer.


I use on:
Ubuntu 15.10 C::B Rev 10561
Win 8.1          C::B Rev 10574
Win 7 32bit    C::B Rev 10561

I hope that this post is helpful for your current spellcheck discussion.

 
Best Regards,
                     Eckard Klotz.
Title: Re: Issue with Spellchecker and German Umlauts
Post by: MortenMacFly on November 20, 2015, 04:52:24 pm
I hope that this post is helpful for your current spellcheck discussion.
You can boil all then down to this simple example:
Code: cpp
/*!
 auslösen
*/
What happens is, that the "ä" is translated into pieces where one of them is interpreted as being a space character in:
OnlineSpellChecker.cpp, method OnlineSpellChecker::OnEditorChangeTextRange(cbEditor* ctrl, int start, int end) const, line:
Code: cpp
if ( SpellCheckHelper::IsWhiteSpace(ch) )
...with:
Code: cpp
bool SpellCheckHelper::IsWhiteSpace(const wxChar &ch)
{
    return wxIsspace(ch) || wxIspunct(ch) || wxIsdigit(ch);
}
The character "ch" for an "ä" is actually not a single one but multiple on of them "falsifies" IsWhiteSpace so the method bails out. You can see nicely if you set a breakpoint there.

Now I am not sure how to solve this (whether its scintilla or us), its not a simple issue... Do you mind to file a bug report on SF?
Title: Re: Issue with Spellchecker and German Umlauts
Post by: eckard_klotz on November 21, 2015, 04:17:14 pm
Hello Morten Mac Fly.

Quote
Do you mind to file a bug report on SF?
.

I hope my post "#259 Special German Characters like ä,ö,ü disturb spell checcking" is still useful even the links to your and my post are not working as desired.

Best regards,
                    Eckard.