unicode by default

harrismh777 harrismh777 at charter.net
Thu May 12 02:14:37 EDT 2011


John Machin wrote:
> On Thu, May 12, 2011 2:14 pm, Benjamin Kaplan wrote:
>>
>> If the file you're writing to doesn't specify an encoding, Python will
>> default to locale.getdefaultencoding(),
>
> No such attribute. Perhaps you mean locale.getpreferredencoding()


 >>> import locale
 >>> locale.getpreferredencoding()
'UTF-8'
 >>>

Yessssssss!


:)




More information about the Python-list mailing list