Reliably getting/setting the (current) encoding name?
Michael Hudson
mwh at python.net
Mon Feb 3 07:36:53 EST 2003
"Mike C. Fletcher" <mcfletch at rogers.com> writes:
> Michael Hudson wrote:
> ...
>
> >> >>> sys.getdefaultencoding()
> >>'ascii'
> >>
> >>(Alex mentioned it in his post)
> >>
> >
> >But that doesn't change to reflect the locale, which I thought was the
> >point of what you asked.
> >
>
> Well, it does with the hack using setdefaultencoding ;) .
Only in a roundabout way.
> ...
>
> >That did occur to me as a possible problem. Did we mention converting
> >your app to all-unicode-all-the-time? Oh yes, I think you did. Try
> >it: it might not be as hard as you think. I was surprised how easy it
> >was to convert pyrepl.
> >
>
> I don't expect it'll be too terribly difficult, but wxprop is heavily
> into types, it's got an lot of automation machinery (including
> type-checking and coercian) for dealing with strings in a GUI as part
> of an object model. Suddenly switching the object-model to be unicode
> based is probably going to cause headaches with upgrading old content
> and the like. It's just not a place I want to venture just yet.
Sounds like you're paying the price for being too clever :)
> >>At the moment, I'm going to go down the path to evil and requiring
> >>the application to set a useful default encoding using the hack Alex
> >>pointed out.
> >>
> >
> >Don't come running to us when, etc. :-)
>
> But why am I paying you these huge Python licensing fees then ;) ,
Shh, didn't we tell you not to mention the Secret PSU
Licensi**$£*%^ NO CARRIER
More information about the Python-list
mailing list