hi:
i have this problem before...
you need insert the sql with
insert into table(fd1,fd2) values(N'val1',N'val2')
then you can response correctlly..
thanks
Main Topics
Browse All TopicsDoes anyone of Experts here know how to insert chinese character (utf-8 charset) into MS SQL Server 2000?
The field are of nvarchar, whenever i attempt to insert, it shows question marks ?????????
It works if i apply either
server.htmlEncode()
or
Function c2u(CnText)
For zzzz = 1 to Len(CnText)
c = Mid(CnText, zzzz, 1)
c2u = c2u & "&#x" & Hex(AscW(c)) & ";"
next
End Function
However the length of the field are fixed and the result will took more spaces
For instance,
请选择 ( 3 chinese characters )
will consume up to 24 nvarchar, thus this is not viable
On each of the asp page
<%@ CodePage = 65001 %>
<%
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.addHeader "cache-control", "no-cache"
Response.addHeader "cache-control", "no-store"
Response.CacheControl = "no-cache"
Response.CharSet = "utf-8"
%>
:
:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
I have something like this.
Thank you for the helps
Regards
Kelvin
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
@ap_sajith
after i remove the codepage attribute i still get the ??????? instead of chinese characters
@darkeryu
Im using a store procedure for that.
given that
@username nvarchar(30)
@password nvarchar(30)
@email varchar(100)
user nvarchar(30)
pass nvarchar(30)
email varchar(100)
select @checkExist = count(*) from login where username = @username
if @checkExist = 0
begin
-- if username does not exist
insert into login(user, pass, email) values(@username, @password, @email)
select 10000 as msg
return
end
How am i suppose to dealing with it.
Business Accounts
Answer for Membership
by: ap_sajithPosted on 2006-06-28 at 05:46:38ID: 17000559
Try removing the codepage attribute. Also, are you getting the jumbled characters on your browser or in you query analyzer.
Cheers!