10/05/2018 16:42, Sven Van Caekenberghe wrote:
Hi,
I propose the following:
https://pharo.manuscript.com/f/cases/21870/Fix-Base64-madness-for-good https://github.com/pharo-project/pharo/pull/1331
This is a much needed cleanup, IMHO. It is a breaking change however, since it changes the signature (return type) of an existing method.
#base64Decoded used to wrongly return a String, while that should be a ByteArray since Base64 encoding is a way to encode bytes as ASCII text, hence decoding it should give you back the original bytes.
Those who were using these methods expecting a string can send #asString to the returned bytarray. Of course that would be wrong, but it would be "as wrong as before", and hence, compatible. So please go ahead and change it. Also, having a "proper" implementation in a live environment serves a teaching vehicle for those learning how stuff works. Regards, -- Esteban A. Maringolo