JNI: String encoding & Java 1.2

Discussion in 'Java' started by Florian, Jun 4, 2004.

  1. Florian

    Florian Guest

    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.

    :)
    Florian, Jun 4, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Hunsley

    IBM's JNI fails where Sun's JNI works

    Alex Hunsley, Nov 3, 2003, in forum: Java
    Replies:
    4
    Views:
    837
    Alex Hunsley
    Nov 4, 2003
  2. Pasturel Jean-Louis

    Porting JNI Windows under JNI LINUX + Wine ?

    Pasturel Jean-Louis, Feb 29, 2004, in forum: Java
    Replies:
    5
    Views:
    891
    Pasturel Jean-Louis
    Mar 3, 2004
  3. vasanth
    Replies:
    0
    Views:
    2,663
    vasanth
    Jan 25, 2005
  4. vasanth
    Replies:
    0
    Views:
    608
    vasanth
    Jan 25, 2005
  5. bgabrhelik
    Replies:
    0
    Views:
    785
    bgabrhelik
    Sep 29, 2009
Loading...

Share This Page