I would like to convert ISO 6937 to unicode in Android.
Is there any functions or classes?
Thanks in advance.
I would like to convert ISO 6937 to unicode in Android.
Is there any functions or classes?
Thanks in advance.
It shouldn't be any different in Android than any other Java platform. Converting between character sets is covered by this answer, but pasted here for posterity:
Charset utf8charset = Charset.forName("UTF-8");
Charset iso88591charset = Charset.forName("ISO-8859-1");
ByteBuffer inputBuffer = ByteBuffer.wrap(new byte[]{(byte)0xC3, (byte)0xA2});
// decode UTF-8
CharBuffer data = utf8charset.decode(inputBuffer);
// encode ISO-8559-1
ByteBuffer outputBuffer = iso88591charset.encode(data);
byte[] outputDat
a = outputBuffer.array();
Naturally, that block of code (pasted verbatim) is for ISO-88591 conversion, but the process should be the same between any two Charsets.
It also looks like Java doesn't (by default) have any builtin Charset support for 6937 (that I can find), but there are projects that add it (such as noophq/java-charset).
With both of those things, you should be able to convert between any two Charsets.
(note: I'm not affiliated with anything I linked, it's just the top results of google)