[QScintilla] Problem entering multi-byte characters

Phil Thompson phil at riverbankcomputing.com
Thu Nov 13 10:22:58 GMT 2008


On Tue, 11 Nov 2008 22:34:45 +0000, Baz Walter <bazwal at ftml.net> wrote:
> Hello
> 
> i am seeing some problems with positioning of the caret when entering 
> multi-byte (utf8) characters. repeatedly entering the character makes 
> the caret jump past the end of the line, then to random positions near 
> the beginning of the line, etc. this is using: python 2.6, qt 4.4.3, sip 
> 4.7.8, pyqt 4.4.4, qsci 2.3.1.
> 
> unfortunately, i don't have any recent snapshots to test this with, but 
> the problem is not there when using python 2.6, qt 4.4.1, sip 4.7.7, 
> pyqt 4.4.3, qsci 2.3.

It may be a regression introduced when fixing a problem with kerned fonts
in v2.3.1.

If you look at SurfaceImpl::MeasureWidths() in PlatQt.cpp, the position of
each character is being saved in the positions array according to it's
character position - maybe it should be the byte position of the first byte
of the character.

I'll look at it soon - but if you beat me to it...

Phil


More information about the QScintilla mailing list