Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

UTF-8 and MS Access

 
Sahil Sharma
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am retrieving the data from MS Access database using stand alone java client. One of the columns in the table contains UTF-8 character (Japanese). When I fetch the data and print on the console it is not showing me the actual value, instead I am getting junk data with ???. I have also set the character encoding to UTF-8 as part of my connection string but still it is not working. What could be the possible reason for this?

Thanks.
 
Lanny Gilbert
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please show your code.
 
Sahil Sharma
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


When I sysout the value. It is coming as ???. I am using eclipse as an IDE and have the character encoding there as well to UTF-8 and still it is not working.
 
Rob Spoor
Sheriff
Posts: 20827
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The console, to which System.out prints (and System.err as well), cannot handle Unicode characters, or almost anything that isn't ASCII. It's not a Java limitation.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!