Author Topic: Issue with Spellchecker and German Umlauts  (Read 1632 times)

Offline eckard_klotz

  • Almost regular
  • **
  • Posts: 150
Issue with Spellchecker and German Umlauts
« 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.
  • The screen shot shows you to German word "zurck" and "Trger". Both contain characters you will not find in the Latin alphabet and .
  • The word zurck is only underline partial while Trger 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  "zurck" the part before Spelling suggestions for will not occur while pointing in the word "Trger" 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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9504
Re: Issue with Spellchecker and German Umlauts
« Reply #1 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: C++
  1. /*!
  2.  auslsen
  3. */
  4.  
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: C++
  1. if ( SpellCheckHelper::IsWhiteSpace(ch) )
...with:
Code: C++
  1. bool SpellCheckHelper::IsWhiteSpace(const wxChar &ch)
  2. {
  3.     return wxIsspace(ch) || wxIspunct(ch) || wxIsdigit(ch);
  4. }
  5.  
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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline eckard_klotz

  • Almost regular
  • **
  • Posts: 150
Re: Issue with Spellchecker and German Umlauts
« Reply #2 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.