Relative Content

Tag Archive for encodingjruby

String.from_java_bytes and encoding

I have a JRuby application, which gets invoked from a Java main program, and receives data in form of a Java byte Array (byte[]). As this data originates from a text file, I know that it is text in some encoding. To convert it to a Ruby String, I use