How can I convert UTF-16 to UTF-32 in java?
I have looked for solutions, but there doesn't seem to be much on this topic. I have found solutions that suggest: String unicodeString = new String("utf8 here"); byte[] bytes = String.getBytes("UTF8"); String converted = new String(bytes,"UTF16"); for converting to utf16 from utf8, however, java doesn't handle "UTF32", which makes this solution unviable. Does anyone know any other way on how to achieve this? Java does handle UTF-32, try this test byte[] a = "1".getBytes("UTF-32"); System.out.println(a.length); it will show that arrays' lentgh = 4 after searching I got this to work: public