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

Reply via email to