← Back to team overview

maria-developers team mailing list archive

Re: Review of base64.diff and german2.diff



>>>>> "Alexander" == Alexander Barkov <bar@xxxxxxxxxxx> writes:


Alexander> http://en.wikipedia.org/wiki/Base64

Alexander> I believe the modern base64 is associated with:
Alexander> - Char for index 62 = "+"
Alexander> - Char for index 63 = "-"
Alexander> - Pad character = "mandatory"

Alexander> Look at the table. All variants that have "+" and "-"
Alexander> for "Char for index 62" and "Char for index 63"
Alexander> have also "Pad character = mandatory".

Sorry, don't understand the above.
(But it was resolved on IRC that you meant + and /)

Alexander> The only exception is:
Alexander> "Modified Base64 encoding for UTF-7 (RFC 1642, obsoleted)".
Alexander> But it's obsoleted long time ago!

Alexander> For those who wants the ancient modified Base64 for UTF-7,
Alexander> there is a simple workaround:

mysql> set @a:='aa';
mysql> select from_base64(rpad(@a,cast(length(@a)/4 as signed)*4,'='));

Alexander> +----------------------------------------------------------+
Alexander> | from_base64(rpad(@a,cast(length(@a)/4 as signed)*4,'=')) |
Alexander> +----------------------------------------------------------+
Alexander> | i                                                        |
Alexander> +----------------------------------------------------------+
Alexander> 1 row in set (0.00 sec)

That's ok workaround, but we should at least document this in the