On Nov 17, 3:02 pm, "Edward K. Ream" <[EMAIL PROTECTED]> wrote:
> On Nov 12, 2:03 pm, p_j <[EMAIL PROTECTED]> wrote:
>
> > Just to slightly correct my original report - input of *any*
> > nonaccented char changes previous accented chars to '?' signs.
>
> I have found the likely source of the problem: my Ubuntu system uses
> utf-16 instead of utf-8. The qt plugin hard-code's utf-8 in various
> places. I'll make the expected encoding some kind of option.
>
> Not fixed yet, but it's next.
It looks like Leo can get away with not specifying encodings in most
(maybe all) cases. Suppose s is any string returned from any Qt
call. s will a QString object, but apparently
s = unicode(s)
suffices to create a proper Python unicode string. Because a QString
is itself a wrapper for a unicode string, the call to 'unicode' simply
converts from one flavor of unicode to another. No encoding is ever
needed.
This looks like another aspect in which Qt is significantly easier to
use than Tk: a whole set of unicode-related settings can just go away.
I'll test this some more before pushing anything, but it looks like we
are getting close.
Edward
P.S. The 'unicode' function doesn't exist in Python 3K, but I'll worry
about that later.
EKR
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---