Forum Stats

  • 3,840,384 Users
  • 2,262,598 Discussions
  • 7,901,256 Comments

Discussions

Extended Ascii character

852802
852802 Member Posts: 3
edited Apr 6, 2011 2:34PM in Java Native Interface (JNI)
Hi

I am getting data from postgreSQL using java. When i was trying to convert from C++ through jni it is giving data incorrectly. Some French characters are not dispalying properly.

Answers

  • tschodt
    tschodt Member Posts: 537
    849799 wrote:
    I am getting data from postgreSQL using java.
    So, you are using the postgreSQL JDBC interface?
    When i was trying to convert from C++ through jni it is giving data incorrectly.
    Some French characters are not displaying properly.
    There is not enough information to say what is wrong.

    Is Java or C++ retrieving data from postgreSQL?
    Is Java or C++ displaying data?

    Is the data UNICODE at all times? [Probably not]
    What other encoding is used?

    Do you have logging of bytes and chars where relevant?
  • 852802
    852802 Member Posts: 3
    Java retrieving data from postgreSQL. Java displaying data correctly where as in C++ is not
  • jschellSomeoneStoleMyAlias
    jschellSomeoneStoleMyAlias Member Posts: 24,877 Gold Badge
    849799 wrote:
    Java retrieving data from postgreSQL. Java displaying data correctly where as in C++ is not
    You are not explaining the problem - you are just posting random statements.

    A JNI problem would be where you start with a java string and convert it to a C++ data types like a char*

    That has NOTHING to do with jdbc nor a specific database.

    Where the string comes from is irrelevant as long as is has the correct data in it. And if it doesn't have the correct data in it then it has NOTHING to do with JNI.
This discussion has been closed.