M
modest
Hi All,
according to
http://java.sun.com/docs/books/tutorial/i18n/text/string.html:
"If a byte array contains non-Unicode text, you can convert the text to
Unicode with one of the String constructor methods. Conversely, you can
convert a String object into a byte array of non-Unicode characters
with the String.getBytes method. When invoking either of these methods,
you specify the encoding identifier as one of the parameters."
It works fine in Java 1.3.1
------------------------------------------------------------------
// Convert ASCII to Unicode
str_uni = new String(str_ascii.getBytes(), "ISO8859_8");
// Convert Unicode to ASCII
str_ascii = new String(str_uni.getBytes("ISO8859_8"));
------------------------------------------------------------------
In Java 1.4.2 it returns question marks only.
What is the difference and how it can be fixed?
I need the solution URGENTLY.
thanks,
L.
according to
http://java.sun.com/docs/books/tutorial/i18n/text/string.html:
"If a byte array contains non-Unicode text, you can convert the text to
Unicode with one of the String constructor methods. Conversely, you can
convert a String object into a byte array of non-Unicode characters
with the String.getBytes method. When invoking either of these methods,
you specify the encoding identifier as one of the parameters."
It works fine in Java 1.3.1
------------------------------------------------------------------
// Convert ASCII to Unicode
str_uni = new String(str_ascii.getBytes(), "ISO8859_8");
// Convert Unicode to ASCII
str_ascii = new String(str_uni.getBytes("ISO8859_8"));
------------------------------------------------------------------
In Java 1.4.2 it returns question marks only.
What is the difference and how it can be fixed?
I need the solution URGENTLY.
thanks,
L.