I'm getting a UTF8 string by processing a request sent by a client application. But the string is really UTF16. What can I do to get it into my local string is a letter followed by \0
character? I need to convert that String into UTF16.
Sample received string: S\0a\0m\0p\0l\0e
(UTF8).
What I want is : Sample
(UTF16)
FileItem item = (FileItem) iter.next();
String field = "";
String value = "";
if (item.isFormField()) {
try{
value=item.getString();
System.out.println("====" + value);
}