S
static
Hi,
I use JNI to call a C function and get a record converted from MARC-8
to UNICODE and return the data in a byteArray. It works fine and the
byteArray is correctly populated. I can write it out to a file and
verified the data.
The problem is converting the byte array to a string. If I do
String n = new String(test);
Then about 6 of the characters get replaced with question marks. Is
there a way to retain all of the data from a byte array and convert it
to a String?
I also tried
String n = new String(test,"UTF-8");
and that didn't work. A few characters got replaced with question
marks.
Any ideas will be greatly appreciated.
Ashley
I use JNI to call a C function and get a record converted from MARC-8
to UNICODE and return the data in a byteArray. It works fine and the
byteArray is correctly populated. I can write it out to a file and
verified the data.
The problem is converting the byte array to a string. If I do
String n = new String(test);
Then about 6 of the characters get replaced with question marks. Is
there a way to retain all of the data from a byte array and convert it
to a String?
I also tried
String n = new String(test,"UTF-8");
and that didn't work. A few characters got replaced with question
marks.
Any ideas will be greatly appreciated.
Ashley