Phillip J. Eby wrote: > Actually, thinking about it some more, it seems to me it's actually more > like this: > > sock.send( ("%d:%s," % > (len(data),data.decode('latin1'))).encode('latin1') ) While this would work, it would still feel wrong: the binary data are *not* latin1 (most likely), so declaring them to be latin1 would be confusing. Perhaps a synonym '8bit' for latin1 could be introduced. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4