I'm working on support for a client. On some pages the client can dynamically create/edit forms and add them to a content page. Some of the pages, auto-fill text input fields with data after login. We receive an XML with the data and then fill the fields. The problem I'm having is that the client is international, and some of the XML data uses Japanese characters which I believe are double byte characters. The characters are correct/visible in the XML, but after we read them in and display them, the html input fields contain "?????" instead of said characters. I have already tried converting the strings by creating a new String and using getBytes("UTF-16"), but that isn't working. I have also tried setting the html charset to "UTF-16" in the Meta tag, but that breaks the page. Any suggestions?
I appreciate the feedback, but that certainly doesn't work. That's what the original code is set to do. From what I understand, UTF-8 is limited to 255 characters. As far as I know, there are no Japanese characters in that set.
Thank you, that made the topic much more understandable! Other articles I've read did not convey the idea correctly. However, as we are currently using "UTF-8", that must not be the problem. I wonder if the XML is using a different charset. Could that cause a problem?