Answered by:
Can we change our app to support japanese characters?

Question
-
User-1497671673 posted
Hi Guys,
We have some software that works with a sql database, our customers want to use japanese characters. When they try and use it with our softare and save the characters through a form, the characters get corrupted. They have said that if we change the charater encoding in our database that we can save jap characters. What im workdering is if we do this will it affect the current data and do our forms have to be rewritten to handle these characters?
Any advice much appreciated...
Pete
Thursday, May 27, 2010 6:18 AM
Answers
-
User78336405 posted
Hi,
Try to change the SQL Collation to japanese.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, May 28, 2010 6:34 AM -
User-319574463 posted
They have said that if we change the charater encoding in our database that we can save jap characters.In your SQL database, what data types do you use for your strings?
- Instead of VARCHAR you should use NVARCHAR
- Instead of CHAR you should use NCHAR
- If using a version of SQL prior to 2005, use NTEXT instead of TEXT
Do you use stored procedures or raw TSQL to insert and update data. If the latter, instead of
INSERT INTO FRED(A, B) VALUES ('A', 'Hello')
use
INSERT INTO FRED(A, B) VALUES (@'A', @'Hello')
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, May 30, 2010 3:11 PM
All replies
-
User560403387 posted
I'm of course not sure where exactly your data gets corrupted, but it shouldn't be too painful to support Japanese. As internally all strings in .NET are unicode, there are usually only two areas where things are likely to go wrong:
- Your interface: Your pages should be encoded in utf-8 (they probably are; it's the default encoding in visual studio)
- Your database: Your string fields should be nvarchar, rather than varchar
Changing either setting doesn't take a lot of time, and shouldn't affect any of your current data. Of course you should thoroughly test anyway.
Menno
Friday, May 28, 2010 6:14 AM -
User78336405 posted
Hi,
Try to change the SQL Collation to japanese.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, May 28, 2010 6:34 AM -
User-319574463 posted
They have said that if we change the charater encoding in our database that we can save jap characters.In your SQL database, what data types do you use for your strings?
- Instead of VARCHAR you should use NVARCHAR
- Instead of CHAR you should use NCHAR
- If using a version of SQL prior to 2005, use NTEXT instead of TEXT
Do you use stored procedures or raw TSQL to insert and update data. If the latter, instead of
INSERT INTO FRED(A, B) VALUES ('A', 'Hello')
use
INSERT INTO FRED(A, B) VALUES (@'A', @'Hello')
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, May 30, 2010 3:11 PM -
User-1200560727 posted
Please go through below post:
http://forums.asp.net/t/1560929.aspx
It will helpful to solve your problem.
Monday, May 31, 2010 12:38 AM