SQL Server Language Problem

  • Hi there,

    I'm having a situation here and need those who've encountered this before to advise.

    I've a database collation set to chinese_prc_ci_as and a table with column set to nvarchar. My PC regional language setting is set to chinese PRC. I uploaded a spreadsheet with chinese characters into the table. From query analyzer I could see those chinese characters. But from front end (.asp) I saw funny characters. But if I do data entry from front end I could see those chinese characters that were entered by me from front end. But from backend I saw funny characters. It's the opposite. Is there any setting that's wrong? Pls advise.

    Thanks,

    Yong

  • Hi,

    It is not SQL Server related Excel takes UTF7 encoding so if you don't set that you get character conversion as you are getting.

     Excel is the strange animal that uses UTF7 so change that line.  Hope this helps.

    Response.Charset = ""   to 

     Response.ContentEncoding = System.Text.Encoding.UTF7

     

    Kind regards,
    Gift Peddie

  • Have you looked at the web server and it's language/character set configuration ? I assume this because of the .asp mentioned for you front end ? Have you also checked out your browser's configuration as well ?

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Hi Gift,

    Thanks for the help. We tried but could not work. According to the feedback from programmer was that the statements are meant for asp.net but we are running on .asp.

    Hi Rudy,

    The funny thing is if the chinese characters are input from front end (web page) then when we retrieve the entry these characters are readable but it's showing funny characters from QA. But if we upload the chinese characters from backend, it's the opposite. Front end is showing funny characters while backend is readable.

    Thanks again,

    Yong

  • Your programmer needs to go and find the Asp version of my code because without this code Excel will not render none English Text.  I looked and found this but I know there are at least four chinese code pages so you have to tell your programmer to modify it as needed including UTF7.  In Asp.net without my code it will not render.  One more thing make it column level collation chinese_prc_ci_as for the column you are storing Excel because that is needed for some east European languages.  Hope this helps.

    Session.CodePage=65001

    Response.CharSet="utf-8"

     

    Kind regards,
    Gift Peddie

Viewing 5 posts - 1 through 4 (of 4 total)

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