print u"\u0432": why is this so hard? UnciodeEncodeError
"Martin v. Löwis"
martin at v.loewis.de
Wed Apr 14 16:12:17 EDT 2004
Scott Schwartz wrote:
>>It is: however, your locale only tells Python the encoding of your
>>terminal, not the encoding of an arbitrary file you may write to.
>
>
> That's not the usual interpretation of locale. It's not about
> terminals, it's about everything, especially files.
At the application's choice, though. Python should not guess unless
it is likely that it is guessing right. For files, it is likely
guessing wrong - even for text files.
Regards,
Martin
More information about the Python-list
mailing list