How to Show Eastern Letter(Chinese Character) on SQL Server/SQL Reporting Services?

后端 未结 5 838
自闭症患者
自闭症患者 2021-02-07 23:12

I need to insert chinese characters in my database but it always show ???? ..

Example:

Insert this record.

微波室外单元-Apple

Then it became ???

相关标签:
5条回答
  • 2021-02-07 23:47
    SELECT 'UPDATE table SET msg=UNISTR('''||ASCIISTR(msg)||''') WHERE id='''||id||''' FROM table WHERE id= '123344556' ;
    
    0 讨论(0)
  • 2021-02-07 23:51

    Try adding the appropriate languages to your Windows locale setings. you'll have to make sure your development machine is set to display Non-Unicode characters in the appropriate language. And ofcourse u need to use NVarchar for foreign language feilds

    0 讨论(0)
  • 2021-02-07 23:53

    Make sure you specify a unicode string with a capital N when you insert like:

    INSERT INTO Table1 (Col1) SELECT N'微波室外单元-Apple' AS [Col1]
    

    and that Table1 (Col1) is an NVARCHAR data type.

    0 讨论(0)
  • 2021-02-08 00:02

    Make sure the column you're inserting to is nchar, nvarchar, or ntext. If you insert a Unicode string into an ANSI column, you really will get question marks in the data.

    Also, be careful to check that when you pull the data back out you're not just seeing a client display problem but are actually getting the question marks back:

    SELECT Unicode(YourColumn), YourColumn FROM YourTable
    

    Note that the Unicode function returns the code of only the first character in the string.

    Once you've determined whether the column is really storing the data correctly, post back and we'll help you more.

    0 讨论(0)
  • 2021-02-08 00:05

    Make sure that you have set an encoding for the database to one that supports these characters. UTF-8 is the de facto encoding as it's ASCII compatible but supports all 1114111 Unicode code points.

    0 讨论(0)
提交回复
热议问题