commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Grennan <>
Subject [codec] Base64 with specified encode/decode alphabets and PAD?
Date Tue, 29 Jan 2013 18:47:53 GMT
I know this was considered several years ago, and a simpler alternative was chosen (the "urlSafe"
boolean switch), but it would be helpful to some of us if we could replace the standard RFC
2045 alphabets with a nonstandard mapping and PAD character. There are applications where
a large amount of legacy code (Java and other) and stored data use an old, nonstandard encoding,
and it would be better to at least take advantage of the Apache code, so that people aren't
always rewriting it (and creating new bugs) when moving to a new platform.

As you might expect, the nonstandard features are the last two encoding chars, and the PAD
char (hyphen instead of equals). If we could set those three values, we could use the code.
We can't just subclass Base64 because the tables are private. And we'd need to adjust the
decoding table, too, unlike URL-safe mode, because the static table uses the RFC values.

Any chance of adding a constructor that would let us specify nonstandard values for those
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message