This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vinay.sajip
Recipients methane, vinay.sajip
Date 2009-09-25.18:15:03
SpamBayes Score 7.5030426e-11
Marked as misclassified No
Message-id <1253902506.68.0.769523809411.issue6991@psf.upfronthosting.co.za>
In-reply-to
Content
It's not about logging - your first example (foo.py) didn't have any
logging code in it.

The problem is caused only when someone doesn't understand how Unicode
and codecs.open works, and logging can't fix this.

The rule is: If you use a stream without encoding and byte strings under
Python 2.x, you'll be OK - fine if you're using ASCII or Latin-1.
However, users of systems outside this (e.g. CJK or Cyrillic) will not
be covered.

For use anywhere, you really have to work in Unicode internally, decode
stuff on the way in and encode stuff on the way out. That's what the
codecs module is for.

If third-party libraries which you are using don't use Unicode properly,
then they are broken, and logging can't fix that. Any attempt to "paper
over the cracks" will fail sooner or later. It's better to identify the
problem exactly where it occurs: Python's Zen says "Errors should never
pass silently."

I'm closing this issue, as it's not really logging-related. Hope that's OK.
History
Date User Action Args
2009-09-25 18:15:07vinay.sajipsetrecipients: + vinay.sajip, methane
2009-09-25 18:15:06vinay.sajipsetmessageid: <1253902506.68.0.769523809411.issue6991@psf.upfronthosting.co.za>
2009-09-25 18:15:04vinay.sajiplinkissue6991 messages
2009-09-25 18:15:04vinay.sajipcreate