Ok, Fine. But I want the ability to specify an encoding ONCE and have use that unless I change it or override a specific conversion. I also want there to be a reasonable default so that if I forget to specify anything, it will work for the majority of cases.
-----Original Message----- From: cplusplus-sig-bounces+matthew.scouten=tradingtechnologies....@python.org [mailto:cplusplus-sig-bounces+matthew.scouten=tradingtechnologies....@py thon.org] On Behalf Of Hans Meine Sent: Thursday, March 19, 2009 11:36 AM To: cplusplus-sig@python.org Subject: Re: [C++-sig] Some thoughts on py3k support On Thursday 19 March 2009 09:02:35 Haoyu Bai wrote: > By default we would use PyUnicode_AsUTF8String(), and encoding could > be explicitly specified by a converter policy. That may keep most of > your code compatible. Please do *not* hard-code UTF-8. At least, if you need to guess a default, use some system (locale) setting, similar to sys.stdout.encoding or sys.getfilesystemencoding(). Personally, I would prefer to have to specify the encoding somewhere in the BPL exporting code. Thinking about it, it might even be necessary to determine the encoding at *runtime*, depending on the wrapped code/library. :-( Have a nice day, Hans _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig