Making safe file names

Chris Angelico rosuav at gmail.com
Tue May 7 19:04:23 EDT 2013


On Wed, May 8, 2013 at 8:18 AM, Fábio Santos <fabiosantosart at gmail.com> wrote:
> I suggest Base64. b64encode
> (http://docs.python.org/2/library/base64.html#base64.b64encode) and
> b64decode take an argument which allows you to eliminate the pesky "/"
> character. It's reversible and simple.

But it doesn't look anything like the original.

I'd be inclined to go for something like quoted-printable or
URL-encoding; special characters become much longer, but ordinary
characters (mostly) stay as themselves.

ChrisA



More information about the Python-list mailing list