*
The moose likes JDBC and the fly likes Issue with Chinese characters in linux environment with Sql Server 2005 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Issue with Chinese characters in linux environment with Sql Server 2005" Watch "Issue with Chinese characters in linux environment with Sql Server 2005" New topic
Author

Issue with Chinese characters in linux environment with Sql Server 2005

prashanthNair
Greenhorn

Joined: May 13, 2004
Posts: 18
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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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.
prashanthNair
Greenhorn

Joined: May 13, 2004
Posts: 18
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
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue with Chinese characters in linux environment with Sql Server 2005