Question
Infosys
AU
Last activity: 21 Mar 2017 20:44 EDT
Saving Japanese characters in SQL Server database
We have an application where we are saving the user data entered in japanese characters to the SQL Server database. However we observed that the data stored is the db appears as '????' . The type of the column is varchar . Is this an expected behaviour? Any quick changes to the db that could help resolve this issue?
***Updated by moderator: Lochan to add Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
PEG
IN
Hi ,
Please verify the character set at Database end. If it is not UTF-8, set to UTF-8 and test the scenario.
http://support.etouch.net/cm/wiki/?id=43321
Infosys
AU
Gangababu,
This is is SQL Server database and not oracle. In SQL Server we have collations defined .
Pegasystems Inc.
IN
HI Binod,
Try updating column to nvarchar from varchar.
Once this is done values while inserting or updating should be prefixed with N
eg Update tableX set y = N'JapaneseCharacter' where condition.
Above will help you verify if DB is accepting Japanese character.
Raise an SR in case not done yet.
Thanks,
Ujjwal
Pegasystems Inc.
IN
Hi Binod,
The same issue is reported by lot of user's in stackoverflow. Kindly refer the below links correct answer marked and perform the same to recitify this issue.
Regards,
Sudhish OP
Pegasystems Inc.
JP
Hi Binod,
I am facing the same issue. Do you have a resolution on your side?
Thanks,
Jun
Techmahindra
IN
Hi Jun,
As stated above have you modified to nvarchar from varchar and also when doing your insert or update, are you prefixing your value with N at the front?
Regards,
Shanthini Charles
Pegasystems Inc.
JP
Hi Shanthini,
Thank you for your response.
I am seeing the same issue at the OOTB table columns like pr_operators.pyPosition, so I could modified to nvarchar but cannot put prefix "N" when saving it. I am not sure it is good idea to modify OOTB table column.
Regards,
Jun
Pegasystems Inc.
JP
I posted a different query, and it has been solved.