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 dabeaz
Recipients dabeaz, mark.dickinson, r.david.murray, rhettinger
Date 2010-12-28.00:21:08
SpamBayes Score 1.428702e-07
Marked as misclassified No
Message-id <>
I encountered this issue is in the context of distributed computing/interprocess communication involving binary-encoded records (and encoding/decoding such records using struct). At its core, this is all about I/O--something where encodings and decoding matter a lot.  Frankly, it was quite surprising that a unicode string would silently pass through struct and turn into bytes.  IMHO, the fact that this is even possible encourages a sloppy usage of struct that favors programming convenience over correctness--something that's only going to end badly for the poor soul who passes non-ASCII characters into struct without knowing it. 

A default encoding might be okay as long as it was set to something like ASCII or Latin-1 (not UTF-8).  At least then you'd get an encoding error for characters that don't fit into a byte.
Date User Action Args
2010-12-28 00:21:12dabeazsetrecipients: + dabeaz, rhettinger, mark.dickinson, r.david.murray
2010-12-28 00:21:11dabeazsetmessageid: <>
2010-12-28 00:21:08dabeazlinkissue10783 messages
2010-12-28 00:21:08dabeazcreate