Forum Moderators: open
I am programming in ASP and doing bidirectional work. The problem I'm having is that when I try to save the foreign langauges characters for e.g Japanese or Hebrew, by the time it reaches the database it gets distorted. I'm using VB6 objects and SQL database and Win2000 OS
Any insight or help would be appreciated.
Ta
Nimisha
I'm using the foll in the head of the html
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
and CodePage is set to 65001
The database fields are set to nvarchar.
Can the original text never be stored in the database?
Also at the moment it either saves it as "???????" or when I change the charset it saves it not as "??????" but for instance like this "皆様からのお"
Is this correct...how can verify?
Ta
Nimisha
the only way i could imagine is to use the msie for example and set the
encoding different from utf-8 or utf-16; with the packets installed that contain japanese letters for example and view those texts (would you even
know something was misspelled if you saw those letters? ;))
> Is this correct...how can verify?
> 皆様からの
It appeared as Japanese text, as posted in your message, if the browser is to Shift_JIS or Japanese autodetect.
I used Japanese Win 98 and checked it with Japanese IE 5.0, English Netscape 4.79 and 6.22 The text was saved as an image. Is this what you typed? [aujp.net]
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
Try using either of the following
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=x-sjis">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=Shift_JIS">
Are you using Japanese or English Windows 2000?
In the Asia and Pacific forum we had a discussion about issues related to displaying Japanese text [webmasterworld.com] using, utf-8 and Japanese GlobalIME on non Japanese Windows. Some info there may help.
because I have to deal with different languages i.e. Japanese, Arabic , Turkish etc. Hence the charset has to be generic.
I seem to be completely stuck as I can't seem to figure out how to verify what is saved in the database. I could give it a try by setting the charset to utf-16.
Hope anyway of you could help me out as it's very frustrating not being able to continue...
appreciate all the help.
Ta
Nimisha
1)I first set the codepage fpor each aspage to the codepage for the language you want to display i.e. if it is Arabic set the codepage to =1256.
2)Then I set the meta tag in the html to
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8" >.
3)In the insert statement of the sql I prefix the text being passed into the field of the database with an "N" for e.g "INSERT INTO tblName () VALUES (N'""')"
4)Finally to see what has been saved into the database, do a Response.BinaryWrite Server.HTMLEncode(Text) in the asp.
IN the database it gets saved either as square blocks in the case of Japanese or correctly in the case of Arabic.
Hope that helps everyone out there...I did struggle a bit to get it all tuned and working but thank you everyone for you suggestions...Hope this helps
Ta
Nimisha