In version 1.4.0 it works OK, but at least from 1.5.2 and above it does
not
work. This only happens in Windows, in Snow Leopard it is still working
The code for testing is this:
require “base64”
data =
“ACCSPROPEXT121010.TXT|UEsDBBQACAAIAOhITj0AAAAAAAAAAAAAAAAVAAAAQUNDU1BST1BFWFQxMjEwMTAuVFhUMzAM9lQI\nCPJ30zV2VFBAYik4KUCBqZGCggEQKKACZxcDZGAIYxiZm1oYGJobUAaMDC3NIfbARYBWAKEpmkJ3\nkJNDQ4AKDY2tDIDISAFNhW8Eirt5ebkMqOVpIwhlaWhhbGhgZGo0PD0dhuppYwgFjHALM0NLY3S3\nkQwMjSxp5mkAUEsHCPwyT7qBAAAA3wIAAFBLAQIUABQACAAIAOhITj38Mk+6gQAAAN8CAAAVAAAA\nAAAAAAAAAAAAAAAAAABBQ0NTUFJPUEVYVDEyMTAxMC5UWFRQSwUGAAAAAAEAAQBDAAAAxAAAAAAA\n”
data.gsub!(“\n”,“”)
data << “\n”
f = File.new(“test.zip”,“w”)
f.write(Base64.decode64(data))
f.close
The way I tested it is like this:
after compiling the file test_base64.rb
java -cp .;jruby-complete-1.4.0.jar test_base64
this creates a file: test.zip that can be unpacked
while this
java -cp .;jruby-complete-1.5.2.jar test_base64
generates a file that cannot be unpacked
By not workingI mean that the result is different from one version to
the
other, and I suppose it should be the same.
Is there something that needs to be configured in order to have it
working?
–
View this message in context:
http://old.nabble.com/Base64.decode64-does-not-work-in-1.5.2-and-1.5.3-in-Windows-tp29965414p29965414.html
Sent from the JRuby - User mailing list archive at Nabble.com.