On Thu, Jun 18, 2009 at 9:00 AM, Ville M. Vainio <[email protected]> wrote:

>
> > I think this can, and should, be done.  g.app.gui.toUnicode will
> > simply do:
> >
> >    return g.toUnicode(s,g.app.gui.defaultQtEncoding)
> >
> > where defaultQtEncoding is utf-8 by default, and can be set by @string
> > default_qt_encoding setting.
>
> I still think this is wrong (my understanding of unicode), but it's
> even more wrong to have it as setting. If anything, it should be
> hardcoded to utf-8.


Well, that is, in essence, what we get by calling g.toUnicode!

In my experience, a setting that *can* match the Python's default encoding
may be worthwhile.  It was with tk.  Furthermore, having that setting
default to utf-8 can hardly be worse than the present situation.  If people
find the setting useful, fine.  If not, nothing has been lost.

Edward

P.S.  The reason I keep going on about g.toUnicode is that it is the
foundation of Leo3k.  In particular, the 'unicode' function does not exist
in Py3k, and so it must be wrapped.

BTW, the present version of g.toUnicode goes overboard in trying to
eliminate duplicate code.  It would be much clearer to accept the
duplication, and have two completely separate versions of the code--one for
Python 2.x and one for Python 3.x.  I'll fix this early in the b3 cycle.

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to