On Tue, Jan 26, 2010 at 5:21 PM, Gil Shwartz <[email protected]> wrote:
> I'm not a QT person, and I'm not too familiar with Leo's internal, > esp. wrt QT, but I do know that a common confusion when dealing with > UTF-8/Unicode is chars vs. bytes. Imo, this must be a Qt or PyQt issue. It took me awhile to come to this conclusion, but in fact the reasoning is simple: A. Everything in Leo is a unicode character. No exceptions. Leo never deals with bytes, only characters. B. We know that encoding issues are not the problem because Terry's characters look right. C. The confusion between chars and bytes must be in Qt itself, because the QTextCursor is returning the wrong values. My idea of a demo is this: 1. Create a QTextEdit inited with several lines from Terry's file. 2. Create a button which when pushed will delete the selected characters, **as reported by Qt**. The instructions are to push the button the characters from example 1, and then characters from example 2. Observe the bug in case 2. Haven't done this yet, but will soon, perhaps following the recent code examples. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
