On Jan 31, 11:59 am, "Edward K. Ream" <[email protected]> wrote:
> > It's always very hard for me to understand the concept of "default > > encoding". Default encoding for what purpose? Writing out files where > > encoding has not been specified explicitly? Encoding for path names? > > Encoding for terminal print commands (sys.stdin.encoding)? > > All of the above. We have to pick something, and that something is, > in effect, 'utf-8'. The only remaining question, in my mind, is how to best make 'utf-8' the default encoding. I was surprised, when I looked, to see how many times the 'utf-8' constant appears in Leo's code. In effect, we have a housekeeping problem, namely simplify the code as much as possible while making its intentions clear. After writing the above, I realized that if we make 'utf-8' the *official* default encoding for g.toUnicode and g.toEncodedString, etc, we can eliminate all arguments that are either g.app.defaultEncoding or 'utf-8'. I plan to do that. Also, I will eliminate the support for @string default-encoding in g.app.setEncoding, which in turn means that g.app.setEncoding always returns 'utf-8', which means that g.app.setEncoding can be eliminated, which means that g.app.defaultEncoding is always 'utf-8', which means that g.app.defaultEncoding can be replaced by 'utf-8', or in the case where 'utf-8' becomes the official default, g.app.defaultEncoding can be eliminated entirely :-) We are getting an early start on spring housecleaning. 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.
