Double-Click selection and accented words

Sep 24, 2008 at 10:11 PM


I noticed today that when I select a word double clicking on it, it selects only the non-accented characters instead of the whole word. Is there a way to solve this problem ?

I've read something about CodePage 65001 and Unicode encoding. I tried that by setting (I've seen utf8 has codepage 65001...) :       this.scintillaControl.Encoding = Encoding.UTF8
It shows only strange chars and still doesn't select whole words...

Does anyone have a solution ?

Thanks in advance

Sep 25, 2008 at 3:15 AM

Ok, I managed to select whole accented words double clicking on them...

At first I tried to simply change the encoding using :
this.scintillaControl.Encoding = Encoding.UTF8

But it doesn't seem to work properly... Instead I changed the Encoding directly during the control initialization using :
_ns.SetCodePage(65001);  Instead of _encoding = Encoding.GetEncoding(NativeInterface.GetCodePage());

Now it's really UTF-8, but the caret position still show ANSI position when I test with :
He'd after the apostrophe it indicates 5 instead of 3.

Don't know if there's something else to modify in order to make it work ?

Anyway the initial problem is solved ! :-)