Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading chinese characters in MS-Access DB 1

Status
Not open for further replies.

tom62

Programmer
Nov 12, 2002
152
0
0
DE
I'm trying to read a MS-Access database table that contains an Artist field. For some table records the Artist field contains chinese characters.

When I read the field, with:
String fieldValue = resultset.getString("Artist");

or with:

byte[] temp = resultset.getBytes("Artist");
String fieldValue = new String[temp);

then all what I get back from the chinese texts are question marks (like: Artist=???).

How can I obtain the true contents of the Artist field, either as a string or as a byte array?
 
from sun's own forum, the outlook isn't too bright:


-kaht

...looks like you don't have a job, so why don't you get out there and feed Tina.
headbang.gif
[rockband]
headbang.gif
 
Hi Kaht,

Thanks for the reply. I'd already read the Sun's forum before. Unfortunately that didn't help me either. What drive me nuts is that my code seems to work on a chinese Windows version but not on my european one. Setting the Locale in my program to chinese however doesn't help either.

Tom
 
Its all about the default char set used by Java (and or Windows) - but I can't remember how you change it. And even if you could change it, I'm not sure you can run in "Latin" mode AND "Chinese" charset mode ...

--------------------------------------------------
Free Database Connection Pooling Software
 
Thank you sedj. I was already afraid of that. Since I have no intention of installing a chinese Windows version, the users of my freeware program will have to live with the fact that I can't support their chinese characters.
 
tom62,

Have a look at this thread, it may be of use ? thread269-1066402

--------------------------------------------------
Free Database Connection Pooling Software
 
Hi sedj

Thanks for the link. A pity however that it didn't help me much further. Apparently I need a character encoding that is not available on my PC.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top