3 ms·
In a similar fashion, I once saw a python script that called out to a one-page C program that read a .csv dump (probably from SQLServer) and blew away the upper
by smitty1e 1y ago
In a similar fashion, I once saw a python script that called out to a one-page C program that read a .csv dump (probably from SQLServer) and blew away the upper byte of each character, demoting it to ASCII.
Once I understood what was afoot, I was sad that someone had worked so hard when python's open() call supports an 'encoding' argument for just these occasions.
- bouke 1y agoReminds me of a time where someone stored the md5 hash of a password as a string by throwing away all non-ascii bytes; so roughly half the bytes.
- o11c 1y agoI've seen something similar, but it depended on whether plain `char` is signed or unsigned, which is highly platform-dependent.
- spiritplumber 1y agothat's the first thing i ever uploaded anywhere! fixtxt.exe on simtel.net