Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

store&read chinese characters in MS SQL server 2000 using Java

807588Jan 9 2009 — edited Feb 11 2009
Hi,

I have a problem to store Chinese characters in MS SQL Server 2000, storing question marks(??????) instead of Chinese characters

I am using JSF framework, SUN APPLICATION Server 9.1 , MS SQL Server 2000 server and Microsoft data source driver class (com.microsoft.sqlserver.jdbc.SQLServerDataSource) to connect db.

I have one solution:

IN JSP:

<%@page contentType="text/html"%>

<%@page pageEncoding="UTF-8"%>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

and

In database column type should “nvarchar” in place of varchar
while inserting or updating the same need to add ‘N’ prefix with the value like insert into client(Name, Id ….) values (N+)

the above is working fine but the problem is here i have already defined database with 100s of tables I cant change database tables as well as queries

Thanks,
Sathi
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 5 2009
Added on Jan 9 2009
1 comment
979 views