[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request - base64 Filename Safe Alphabet
From: |
Jim Meyering |
Subject: |
Re: Feature request - base64 Filename Safe Alphabet |
Date: |
Tue, 29 Apr 2008 15:07:18 +0200 |
Bo Borgerson <address@hidden> wrote:
> Christopher Kerr wrote:
>> After being burned by using `head -c6 /dev/urandom | base64` as part of a
>> directory name, I realised that it would be useful if base64 had an option to
>> generate URL and Filename safe encodings, as specified in RFC 3548 section 4.
>>
>> This would make
>> cat FILE | base64 --filename-safe
>> equivalent to
>> cat FILE | base64 | tr '+/' '-_'
>> using the current coreutils tools.
>
> Hi,
>
> lib/base64.c looks fairly easy to pull apart so that current functions
> base64_encode and base64_decode become wrappers around internal
> functions that take an additional argument describing the alphabet.
>
> New functions base64_encode_filesafe and base64_decode_filesafe could
> then be added without breaking the pre-existing interface or duplicating
> a lot of code.
Beware:
there are two versions of base64.c.
The one in gnulib and another in coreutils/gl/lib.
Simon and I have been thinking about how to merge these
two for some time, but I haven't found time since our last exchange.
Volunteers welcome ;-)
- Re: Feature request - base64 Filename Safe Alphabet, (continued)
- Re: Feature request - base64 Filename Safe Alphabet, Pádraig Brady, 2008/04/29
- Re: Feature request - base64 Filename Safe Alphabet, Eric Blake, 2008/04/29
- Re: Feature request - base64 Filename Safe Alphabet, Bo Borgerson, 2008/04/29
- Re: Feature request - base64 Filename Safe Alphabet, Pádraig Brady, 2008/04/29
- Re: Feature request - base64 Filename Safe Alphabet, Eric Blake, 2008/04/29
- Re: Feature request - base64 Filename Safe Alphabet, Bo Borgerson, 2008/04/29
- Re: Feature request - base64 Filename Safe Alphabet, Gabriel Barazer, 2008/04/29
- Re: Feature request - base64 Filename Safe Alphabet, Bo Borgerson, 2008/04/29
- Re: Feature request - base64 Filename Safe Alphabet, Andreas Schwab, 2008/04/29
Re: Feature request - base64 Filename Safe Alphabet, Bo Borgerson, 2008/04/29
- Re: Feature request - base64 Filename Safe Alphabet,
Jim Meyering <=
Re: Feature request - base64 Filename Safe Alphabet, Jim Meyering, 2008/04/29