News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Issue with Spellchecker and German Umlauts

Started by eckard_klotz, November 19, 2015, 06:43:31 AM

Previous topic - Next topic

eckard_klotz

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.


  • The screen shot shows you to German word "zurück" and "Träger". Both contain characters you will not find in the Latin alphabet ü and ä.

  • The word zurück is only underline partial while Träger is underlined completely.

  • If I open the context menu to choose the correct spelling you will see that both words are mentioned by Find or Permanently Highlight completely while Spelling suggestions for is mentioning only the part until the German character or the the part behind depending on the pointed part of the word while opening the context menu.

  • If I open the context menu while pointing in the word  "zurück" the part before ü Spelling suggestions for will not occur while pointing in the word "Träger" before ä results in showing an other character for ä the menu option Spelling suggestions for.

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.

MortenMacFly

Quote from: eckard_klotz on November 19, 2015, 06:43:31 AM
I hope that this post is helpful for your current spellcheck discussion.
You can boil all then down to this simple example:
Code (cpp) Select
/*!
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) Select
if ( SpellCheckHelper::IsWhiteSpace(ch) )
...with:
Code (cpp) Select
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?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

eckard_klotz

Hello Morten Mac Fly.

QuoteDo 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.