Message124743
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:12 | dabeaz | set | recipients:
+ dabeaz, rhettinger, mark.dickinson, r.david.murray |
2010-12-28 00:21:11 | dabeaz | set | messageid: <1293495671.9.0.54616848367.issue10783@psf.upfronthosting.co.za> |
2010-12-28 00:21:08 | dabeaz | link | issue10783 messages |
2010-12-28 00:21:08 | dabeaz | create | |
|