Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issue with Chinese characters in linux environment with Sql Server 2005

 
Prashanth Nair
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I am trying to get the Chinese characters from an SQL Server 2005 Server with my web application hosted with Jboss server in a Linux box (RHEL). The issue is that, the Chinese characters never gets returned from DB and shows some square boxes instead. I have tried both the JTDS drivers as well as the SqlJdbc Drivers from Microsoft for this.Interestingly the same combination of DB/Drivers Works fine in a Windows environment with the Chinese characters returned in a String from the resultset.

Any help on the issue would be greatly appreciated

Thanks
Prashanth
 
Paul Clapham
Sheriff
Pie
Posts: 20750
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have forgotten that there are two steps in your process: (1) Get the data from the database; (2) Display the data. You have made the arbitrary assumption that step (1) is the problem.

However "square boxes" in a GUI (you didn't say anything about your display step) always indicate that you have chosen a font which cannot render the characters. So choose a font which can render Chinese characters and you may find your problem goes away.
 
Prashanth Nair
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:You have forgotten that there are two steps in your process: (1) Get the data from the database; (2) Display the data. You have made the arbitrary assumption that step (1) is the problem.

However "square boxes" in a GUI (you didn't say anything about your display step) always indicate that you have chosen a font which cannot render the characters. So choose a font which can render Chinese characters and you may find your problem goes away.


Thanks for the suggestion Paul. From both Windows & Linux boxes, i am trying to get the response from the Jboss servers which queries the Db. I am outing the response as xml and is trying to render the same in a Browser. so do you mean to say that installing a proper Chinese font in Linux box should solve the issue?
 
Paul Clapham
Sheriff
Pie
Posts: 20750
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea. I thought I understood your problem but now you have thrown a browser into the pot without describing what's happening. In other words instead of two steps, you have maybe three or four steps in the process.

So put on your developer's hat and figure out what those steps are. Then put on your tester's hat and figure out how to test each of those steps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic