handle chinese characters?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • js

    handle chinese characters?

    Hi, hwo to use ASP to handle chinese characters output?
    I have try two ways:
    1. store the string in a text file(unicode file)
    2. store the string in an access database

    The first method got an error:
    Active Server Pages error 'ASP 0239'
    Cannot process file
    UNICODE ASP files are not supported.

    The second method output "???" on the browser.

    How to handle it, pls help.

    Thanks....


  • Mark Schupp

    #2
    Re: handle chinese characters?

    Put session.codepag e=65001 at the beginning of your page to tell ASP to send
    data to the browser in UTF-8 format.

    That should make the Access approach work.

    To use a text file. Put the data in a unicode .txt file and read it in with
    the scripting.files ystem object (there is a parameter specifying a unicode
    file). Then output the information as desired.

    --
    Mark Schupp
    Head of Development
    Integrity eLearning



    "js" <js@someone@hot mail.com> wrote in message
    news:uDUke3SDEH A.580@TK2MSFTNG P11.phx.gbl...[color=blue]
    > Hi, hwo to use ASP to handle chinese characters output?
    > I have try two ways:
    > 1. store the string in a text file(unicode file)
    > 2. store the string in an access database
    >
    > The first method got an error:
    > Active Server Pages error 'ASP 0239'
    > Cannot process file
    > UNICODE ASP files are not supported.
    >
    > The second method output "???" on the browser.
    >
    > How to handle it, pls help.
    >
    > Thanks....
    >
    >[/color]


    Comment

    • js

      #3
      Re: handle chinese characters?

      Thanks Marks!

      It help me out.


      Comment

      • Hans

        #4
        Re: handle chinese characters?

        You must of course have a unicode font on the client. Add
        <%@codepage=650 01%> in top of your asp files (don't save your asp files in
        Unicode text). Add a <meta> tag or add a custom HTTP header on your virtual
        direcotry with customer Header Name "Content-Type" and value "text/html;
        Charset=utf-8" (without quotes). You can later on remove this header for
        individual files (or you can just add custom headers on the files you want).
        This will enforce the encoding (which you in IE can see by right
        click->Encoding) in the page to be utf-8. If the encoding is not correct and
        you post back data to the server it will be "rubbish".

        In your access database open a table and select a unicode font in
        Format->Font menu to see unicode characters in Access. It could otherwise be
        problematic to see what is actually stored in database.

        Regards
        /Hans


        Comment

        • Hans

          #5
          Re: handle chinese characters?

          Sorry if this mesage is sent twice (it was immeidately removed for some
          reason)

          You must of course have a unicode font on the client. Add
          @codepage=65001 in top of your asp files (don't save your asp files in
          Unicode text). Add a <meta> tag or add a custom HTTP header on your virtual
          direcotry with customer Header Name "Content-Type" and value "text/html;
          Charset=utf-8" (without quotes). You can later on remove this header for
          individual files (or you can just add custom headers on the files you want).
          This will enforce the encoding (which you in IE can see by right
          click->Encoding) in the page to be utf-8. If the encoding is not correct and
          you post back data to the server it will be "rubbish".

          In your access database open a table and select a unicode font in
          Format->Font menu to see unicode characters in Access. It could otherwise be
          problematic to see what is actually stored in database


          Regards
          /Hans


          Comment

          • js

            #6
            Re: handle chinese characters?

            Thanks Hans.

            "Hans" <hansb@sorry.no spam.com> wrote in message
            news:ua5qfLZDEH A.688@tk2msftng p13.phx.gbl...[color=blue]
            > You must of course have a unicode font on the client. Add
            > <%@codepage=650 01%> in top of your asp files (don't save your asp files in
            > Unicode text). Add a <meta> tag or add a custom HTTP header on your[/color]
            virtual[color=blue]
            > direcotry with customer Header Name "Content-Type" and value "text/html;
            > Charset=utf-8" (without quotes). You can later on remove this header for
            > individual files (or you can just add custom headers on the files you[/color]
            want).[color=blue]
            > This will enforce the encoding (which you in IE can see by right
            > click->Encoding) in the page to be utf-8. If the encoding is not correct[/color]
            and[color=blue]
            > you post back data to the server it will be "rubbish".
            >
            > In your access database open a table and select a unicode font in
            > Format->Font menu to see unicode characters in Access. It could otherwise[/color]
            be[color=blue]
            > problematic to see what is actually stored in database.
            >
            > Regards
            > /Hans
            >
            >[/color]


            Comment

            Working...