On 9 October 2011 20:13, Teemu Antti-Poika <antti...@gmail.com> wrote: > On Oct 9, 12:56 pm, Ray Miller <r...@1729.org.uk> wrote: >> On 6 October 2011 19:38, Ray Miller <r...@1729.org.uk> wrote: >> > Incidentally, I used the Apache Commons Base64 encoder, as the one in >> > contrib was producing different results from the Apache Commons and >> > Perl implementations. Perhaps a bug? >> >> ... >> This string differs in several positions (first at character 3). Any >> idea what's going wrong? > > That does look like a bug. On closer look base64/encode does not > handle negative bytes properly (java has only unsigned bytes and bitwise > operations on byte arrays always cause grief).
Thanks for investigating and tracking down the bug - I didn't know were to start! > As discussed elsewhere, the base64 module is not very efficient and > is not currently planned to be migrated to a new style contrib module. > Maybe using commons-codec is the best alternative for you? I already switched my code to use commons-codec, just posted here in case it was a bug in the contrib library that might catch out someone else. Thanks again for your investigation and explanation. Ray. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en