Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Unanswered: input Unicode data into SQL Server table

    Hi,

    What are the steps in inputting Unicode data into a SQL server table. I use the insert command and cut and paste some Chinese characters, and inserted into a ntext field. When querying, the other fields showed up fine, but not the ntext field. So how to you properly enter in Unicode data and have it displayed properly when querying.

    Thanks in advance!
    Eric

  2. #2
    Join Date
    Oct 2003
    Posts
    12
    What are you using to query the data? If you are doing a query from Query Analyzer you must ensure that font that you are using is capable of displaying Unicode characters.

    Right click in the results pane and select a Unicode enabled font.

    Hope this helps...

  3. #3
    Join Date
    Oct 2003
    Posts
    2
    Thanks for your reply Smorton. I use Query Analyser to insert records into the table. I did as you said for both the input and output areas. I set the font to MS Hei (Chinese_GB2312).

    The problem is I cut some Chinese characters off some website and pasted it into the Query Analyser like the following:

    insert into my_table
    values('V00002', N'??', 5.00, N'??')

    The Unicode values show up as ?? after cut and paste. So doesn't show up properly upon insertion. What is the right way to make the insert and select work so the proper Chinese characters show up?

    Thanks,
    Eric

  4. #4
    Join Date
    Oct 2003
    Posts
    12
    Try setting both the Editor, Results Text, and Results Grid /Open Table to @Arial Unicode MS (Western) font.

    Query Analyzer will change the character to '?' if it cannot find a character in the font to display it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •