Displaying Non-English Characters

  • I am working with an existing DB (SQL Server 2000 - 8.00.2039). It resides on a server running Windows Server 2003 R2.

    The client wants to begin processing international orders and has provided a sample order that contains Japanese characters in the address fields. I can insert the record into the DB but the fields containing the Japanese characters display as ???. The Japanese characters display just fine in the server environment (i.e., Notepad, Excel, etc.) and I can paste the characters into Query Analyzer. I have tried inserting the characters directly into the DB using the Update / Set commands but they still display as ??? in the DB.

    I do not need to process (i.e., sort or search) the characters, only store them and export them to a shipping application. The Data Type of the fields are nvarchar.

    I suspect that there is a setting somewhere that I am missing, but I'm pretty new at this and don't know where to go from here.

  • Are you using nvarchar?

  • David

    Yes, the Data Type for the fields in question has been changed to nvarchar. I have also been able to successfully paste the Japanese characters into the DB from Enterprise Manager but when I try to make the change via Query Analyzer using the UPDATE .... SET commands, or via the Stored Procedure that is used to insert the records under normal circumstances, it doesn't work. I have changed the Data Type declarations in the Stored Procedure to nvarchar.

    THANKS

  • do you have a sample update statement?

  • update order_header set shipname1 ='??'

    where orderno = '13153461'

  • hmm - interesting.

    If you just add the nvarchar notation (e.g.

    update order_header set shipname1 =N'??') Notice the N in front of the values.

    then although the characters themselves come across as little squares - if I paste the query results in Excel - I get the right results (meaning the japanese characters are "back"). so it's a font issue it seems (the default font doesn't know what to do with them, but it can pass this along for others to handle correctly)...

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • When I use:

    update order_header set shipname1 = N '??'

    where orderno = '13153461'

    I get the following error message:

    Server: Msg 170, Level 15, State 1, Line 1

    Line 1: Incorrect syntax near '??'.

  • jmasson (4/17/2008)


    When I use:

    update order_header set shipname1 = N '??'

    where orderno = '13153461'

    I get the following error message:

    Server: Msg 170, Level 15, State 1, Line 1

    Line 1: Incorrect syntax near '??'.

    delete the space between the N and the quote.

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • THANKS! That works. The character is successfully inserted. Now, I have to see what I have to do to the Stored Procedure to make that work. That's tonight's job.

  • although the characters themselves come across as little squares - if I paste the query results in Excel - I get the right results (meaning the japanese characters are "back").

    You are right Matt. This is an issue of configuring the language Options of the OS.

    In Win XP it is set through Control Panel -> Regional And Language Options - > Advanced then check the required language options in the list 'Code Page Conversion Tables'

    Best regards,

    Maz

    -----------------------------------------------------------[font=Arial Black]Time Is Money[/font][font=Arial Narrow]Calculating the Number of Business Hours Passed since a Point of Time[/url][/font][font=Arial Narrow]Calculating the Number of Business Hours Passed Between Two Points of Time[/font]

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply