Fwd: Lossless bulletproof conversion to unicode (backslashing) (fwd)

Laura Creighton lac at openend.se
Fri May 29 04:41:09 EDT 2015


In a message of Fri, 29 May 2015 11:05:07 +0300, anatoly techtonik writes:

>Added Mailman to my suxx tracker:
>https://github.com/techtonik/suxx-tracker#mailman

You are damning the wrong piece of software -- this is not a problem
with mailman; mailman doesn't care at all what software you use to
read mail and reply to it with.  The problem is with the various
readers and repliers that people are using.  In particular, people on
the other side of one the usenet -> python-list gateway may not be seeing
this as mail at all, or sending their replies as mail.

But back to your original problem.

I still don't understand why you need to go from some lossless
representation of your filename, back to the original.  You start
with the binary version of the filename  -- a series of bytes which
turns out to be good Cyrillic text, but could be anything.  You store
that as the first so many bytes of your file. If ever you need to have
the original representation of your filename, you already have it,
right there, by reading the first so many bytes of your file.  Why
care about what the user sees as a filename?

Laura





More information about the Python-list mailing list