Link to home
Start Free TrialLog in
Avatar of traveh
traveh

asked on

JDBC connection to an Hebrew ANSI database

Hi,

I am connecting via JDBC to an ANSI database with Hebrew strings (the character's decimal value is between 224 and 250).

When reading the data from the database, I get garbage instead of the correct Unicode strings.

Obviously, the JDBC should do the decoding using the system's default encoding for non-Unicode programs, or a parameter stating the encoding to use (this way an ANSI character with decimal value 224 will be translated to a Unicode character with decimal value 1488).

The problem is - how do I tell the JDBC to do this conversion, and where do I define the encoding to use?

Regards,
Tal.
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

What database?
Avatar of traveh
traveh

ASKER

Oracle 8
Try setting a charset of Cp1255 in your connection string. See driver docs for details
Avatar of traveh

ASKER

Hi Cehj,

Thanks for your quick response.

I spent a couple of hours searching through documentation and in the internet, but could not find any explanation or example of how the charset is used within the database connection string.

I guess I'm missing something...

Can you give a specific example of how this can be used, or point me somewhere this is explained?

Many thanks,
Tal.
Very difficult to find this sort of thing! Which driver are you using?
Just a quick thought, did you talk to the Oracle people in Israel, Tal? (I assume you're in Israel, of course...)
Avatar of traveh

ASKER

Hi Doron,

I was not aware I can contact Oracle people in Israel... do they have an Israeli support center?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
works for me :)