Saving Classic ASP in UTF-8 Format

Discussion in 'ASP General' started by RobertHillEDS, Aug 3, 2007.

  1. I have classic asp files (IIS6) that need to be saved in UTF-8 format. I
    save a file with Notepad using SAVE-AS & UTF-8 format. If I reopen the file
    using Notepad and bring up the save-as dialog is defaults to UTF-8, which is
    good. But after the file is modified and saved using Visual Interdev the
    format switches back to ANSI format, which causes some international
    characters to display as little boxes in the browser. I found one comment on
    the internet about making sure the Meta tag with Charset=UTF-8 must be in the
    file to instruct interdev to use the UTF-8 format when saving. This seems to
    work on some .asp files but not all.

    Any suggestions would be appreciated.

    Thank You

    --
    Robert Hill
    RobertHillEDS, Aug 3, 2007
    #1
    1. Advertising

  2. RobertHillEDS

    Evertjan. Guest

    =?Utf-8?B?Um9iZXJ0SGlsbEVEUw==?= wrote on 03 aug 2007 in
    microsoft.public.inetserver.asp.general:

    > I have classic asp files (IIS6) that need to be saved in UTF-8 format.
    > I save a file with Notepad using SAVE-AS & UTF-8 format. If I reopen
    > the file using Notepad and bring up the save-as dialog is defaults to
    > UTF-8, which is good. But after the file is modified and saved using
    > Visual Interdev the format switches back to ANSI format, which causes
    > some international characters to display as little boxes in the
    > browser.
    >
    > Any suggestions would be appreciated.


    Don't use Visual Interdev, I don't.

    > I found one comment on the internet about making sure the
    > Meta tag with Charset=UTF-8 must be in the file to instruct interdev
    > to use the UTF-8 format when saving. This seems to work on some .asp
    > files but not all.


    I would not know about this.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Aug 3, 2007
    #2
    1. Advertising

  3. "RobertHillEDS" <> wrote in message
    news:...
    > I have classic asp files (IIS6) that need to be saved in UTF-8 format. I
    > save a file with Notepad using SAVE-AS & UTF-8 format. If I reopen the

    file
    > using Notepad and bring up the save-as dialog is defaults to UTF-8, which

    is
    > good. But after the file is modified and saved using Visual Interdev the
    > format switches back to ANSI format, which causes some international
    > characters to display as little boxes in the browser. I found one comment

    on
    > the internet about making sure the Meta tag with Charset=UTF-8 must be in

    the
    > file to instruct interdev to use the UTF-8 format when saving. This seems

    to
    > work on some .asp files but not all.
    >
    > Any suggestions would be appreciated.
    >


    You should also have:-

    <%@ codepage=65001 %>

    at the top of your page.


    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Aug 3, 2007
    #3
  4. --
    Robert Hill


    "Anthony Jones" wrote:

    > "RobertHillEDS" <> wrote in message
    > news:...
    > > I have classic asp files (IIS6) that need to be saved in UTF-8 format. I
    > > save a file with Notepad using SAVE-AS & UTF-8 format. If I reopen the

    > file
    > > using Notepad and bring up the save-as dialog is defaults to UTF-8, which

    > is
    > > good. But after the file is modified and saved using Visual Interdev the
    > > format switches back to ANSI format, which causes some international
    > > characters to display as little boxes in the browser. I found one comment

    > on
    > > the internet about making sure the Meta tag with Charset=UTF-8 must be in

    > the
    > > file to instruct interdev to use the UTF-8 format when saving. This seems

    > to
    > > work on some .asp files but not all.
    > >
    > > Any suggestions would be appreciated.
    > >

    >
    > You should also have:-
    >
    > <%@ codepage=65001 %>
    >
    > at the top of your page.
    >
    >
    > --
    > Anthony Jones - MVP ASP/ASP.NET
    >
    >
    >

    Here is a sample asp page, that always reverts back to ANSI format when
    saved by visual Interdev.

    <%@ Language=VBScript %>
    <%@ codepage=65001 %>

    <%
    'language Indicator
    Const SPANISH = "SPA"
    Const ENGLISH = "ENG"
    dim mvarLangCd

    mvarLangCd = Ucase(Request.QueryString("LangCd"))
    If mvarLangCd = "" Then
    mvarLangCd = ENGLISH
    End If
    %>



    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <LINK rel="stylesheet" type="text/css" href="../_Themes/EPayStyleSheet.css">
    <TITLE><%=HTML_PAGE_TIMEOUT%></TITLE>
    </HEAD>
    <BODY>
    <table width="558" border=0>
    <tr><td>
    <P class=ScreenTitle align=center>TimeOut</P>
    </td></tr>
    <tr height=45><td>
    </td></tr>
    <tr><td>
    <P class=BottomInfo align=center>time out</P>
    </td></tr>
    </table>
    </BODY>
    </HTML>

    Robert
    RobertHillEDS, Aug 3, 2007
    #4
  5. "RobertHillEDS" <> wrote in message
    news:...
    >
    > --
    > Robert Hill
    >
    >
    > "Anthony Jones" wrote:
    >
    > > "RobertHillEDS" <> wrote in message
    > > news:...
    > > > I have classic asp files (IIS6) that need to be saved in UTF-8 format.

    I
    > > > save a file with Notepad using SAVE-AS & UTF-8 format. If I reopen

    the
    > > file
    > > > using Notepad and bring up the save-as dialog is defaults to UTF-8,

    which
    > > is
    > > > good. But after the file is modified and saved using Visual Interdev

    the
    > > > format switches back to ANSI format, which causes some international
    > > > characters to display as little boxes in the browser. I found one

    comment
    > > on
    > > > the internet about making sure the Meta tag with Charset=UTF-8 must be

    in
    > > the
    > > > file to instruct interdev to use the UTF-8 format when saving. This

    seems
    > > to
    > > > work on some .asp files but not all.
    > > >
    > > > Any suggestions would be appreciated.
    > > >

    > >
    > > You should also have:-
    > >
    > > <%@ codepage=65001 %>
    > >
    > > at the top of your page.
    > >
    > >
    > > --
    > > Anthony Jones - MVP ASP/ASP.NET
    > >
    > >
    > >

    > Here is a sample asp page, that always reverts back to ANSI format when
    > saved by visual Interdev.
    >
    > <%@ Language=VBScript %>
    > <%@ codepage=65001 %>


    Try:-

    <%@ codepage=65001 Language=VBScript %>

    >
    > <%
    > 'language Indicator
    > Const SPANISH = "SPA"
    > Const ENGLISH = "ENG"
    > dim mvarLangCd
    >
    > mvarLangCd = Ucase(Request.QueryString("LangCd"))
    > If mvarLangCd = "" Then
    > mvarLangCd = ENGLISH
    > End If
    > %>
    >
    >
    >
    > <HTML>
    > <HEAD>
    > <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
    > <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    > <LINK rel="stylesheet" type="text/css"

    href="../_Themes/EPayStyleSheet.css">
    > <TITLE><%=HTML_PAGE_TIMEOUT%></TITLE>
    > </HEAD>
    > <BODY>
    > <table width="558" border=0>
    > <tr><td>
    > <P class=ScreenTitle align=center>TimeOut</P>
    > </td></tr>
    > <tr height=45><td>
    > </td></tr>
    > <tr><td>
    > <P class=BottomInfo align=center>time out</P>
    > </td></tr>
    > </table>
    > </BODY>
    > </HTML>
    >



    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Aug 3, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JJBW
    Replies:
    1
    Views:
    10,124
    Joerg Jooss
    Apr 24, 2004
  2. =?Utf-8?B?QXNoYQ==?=
    Replies:
    3
    Views:
    419
  3. Arifi Koseoglu
    Replies:
    2
    Views:
    964
    Arifi Koseoglu
    Apr 13, 2004
  4. Lovely Angel For You

    Saving Images While Saving ASP Pages !

    Lovely Angel For You, Oct 2, 2003, in forum: ASP General
    Replies:
    1
    Views:
    205
    Curt_C [MVP]
    Oct 3, 2003
  5. InvestorTrade
    Replies:
    2
    Views:
    327
    InvestorTrade
    Mar 3, 2008
Loading...

Share This Page