JNI: String encoding & Java 1.2

F

Florian

Hello everyone,

I am using a JNI interface to call a java class from a delphi app.

The java class has a signature akin to this:

public void perform(String[] names);


All is well and dandy under jdk 1.4, but when using JDK 1.2, all my
strings lose their encoding. For example, under 1.4 , I can pass the
string "éà?"
(éà€) from delphi using StringToJString and get the
same string on the java side.

Using JDK 1.2, I get "???", seems like an encoding problem to me.

Has anyone already run into this problem before?
Should I convert the delphi strings into a byte[] representation and
call new String(byte[],String encoding) on the java side? If yes, how
can I do that in delphi?

Thanks a bundle, I'm getting desperate here.

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top