coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: altchars for base64


From: Kaz Kylheku (Coreutils)
Subject: Re: altchars for base64
Date: Sun, 15 Mar 2020 10:30:15 -0700
User-agent: Roundcube Webmail/0.9.2

On 2020-03-15 09:00, Assaf Gordon wrote:
Hello,

On 2020-03-15 12:12 a.m., Kaz Kylheku (Coreutils) wrote:
On 2020-03-14 22:20, Peng Yu wrote:
Python base64 decoder has the altchars option.
[...]
But I don't see such an option in coreutils' base64. Can this option
be added? Thanks.

# use %* instead of +/:
base64 whatever | tr '+/' '%*'

The reason for alternative characters is typically do use then in URLs,
where "/" and "+" are problematic.

A new command "basenc" was introduced in coreutils version 8.31
(released last year) which supports multiple encodings.

If your script has to work in installations that aren't up to
Coreutils 8.31, or don't use Coreutils at all (base64 comes from
somewhere else), you need the tr trick or its ilk.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]