aspx page encoding

Discussion in 'ASP .Net' started by z f, Dec 26, 2004.

  1. z f

    z f Guest

    Hi,

    i run a web application in a commercial hosting.
    my web app need encoding of hebrew, but the default encoding on the hosting
    (win2003) is english - westren-european, and my pages are being read as
    western european encoding even if i add a content-encoding=windows-1255
    which should work.
    the only solution i found is to save the pages as unicode, but this is
    annoying, because there is no option to set the default page encoding in
    visual studio 2003, so i have to change it for each page, and sometimes it
    changes back.

    is there an option that the pages will be read by IIS/asp.net using a
    specific encoding in the configuration of the application.
    the problem is that when the pages are saved as ascii and using a
    windows-1255 encoding as on the development computer, it does not display
    correctly.

    please advise.
    TIA, z.
     
    z f, Dec 26, 2004
    #1
    1. Advertising

  2. ASP.NET runtime does not use any META information in the file. It uses
    fileEncoding attribute that you can specify in web.config file. Have a look
    here

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
    vbtskeditingwebconfigfileforwebformsglobalization.asp

    If fileEncoding attribute is not specified, ASP.NET runtime reads file in
    default OS codepage unless the file has Unicode or UTF-8 signature.

    You can work around VS limitation of lack of default encoding by resaving
    new file templates in Unicode or UTF-8 with signature. Then VS will respect
    file signatures no matter what META element might specify.

    Thanks

    Mikhail Arkhipov (Microsoft)
    -- This post is provided 'AS IS' with no warranties and confers no rights

    On 12/26/04 10:30, in article #, "z f"
    <> wrote:

    > Hi,
    >
    > i run a web application in a commercial hosting.
    > my web app need encoding of hebrew, but the default encoding on the hosting
    > (win2003) is english - westren-european, and my pages are being read as
    > western european encoding even if i add a content-encoding=windows-1255
    > which should work.
    > the only solution i found is to save the pages as unicode, but this is
    > annoying, because there is no option to set the default page encoding in
    > visual studio 2003, so i have to change it for each page, and sometimes it
    > changes back.
    >
    > is there an option that the pages will be read by IIS/asp.net using a
    > specific encoding in the configuration of the application.
    > the problem is that when the pages are saved as ascii and using a
    > windows-1255 encoding as on the development computer, it does not display
    > correctly.
    >
    > please advise.
    > TIA, z.
    >
    >
     
    Mikhail Arkhipov (Microsoft), Dec 26, 2004
    #2
    1. Advertising

  3. z f

    z f Guest

    the link does not work, please re-send the link
    thanks!



    "Mikhail Arkhipov (Microsoft)" <> wrote in
    message news:BDF44738.9E95%...
    > ASP.NET runtime does not use any META information in the file. It uses
    > fileEncoding attribute that you can specify in web.config file. Have a

    look
    > here
    >
    >

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
    > vbtskeditingwebconfigfileforwebformsglobalization.asp
    >
    > If fileEncoding attribute is not specified, ASP.NET runtime reads file in
    > default OS codepage unless the file has Unicode or UTF-8 signature.
    >
    > You can work around VS limitation of lack of default encoding by resaving
    > new file templates in Unicode or UTF-8 with signature. Then VS will

    respect
    > file signatures no matter what META element might specify.
    >
    > Thanks
    >
    > Mikhail Arkhipov (Microsoft)
    > -- This post is provided 'AS IS' with no warranties and confers no rights
    >
    > On 12/26/04 10:30, in article #, "z f"
    > <> wrote:
    >
    > > Hi,
    > >
    > > i run a web application in a commercial hosting.
    > > my web app need encoding of hebrew, but the default encoding on the

    hosting
    > > (win2003) is english - westren-european, and my pages are being read as
    > > western european encoding even if i add a content-encoding=windows-1255
    > > which should work.
    > > the only solution i found is to save the pages as unicode, but this is
    > > annoying, because there is no option to set the default page encoding in
    > > visual studio 2003, so i have to change it for each page, and sometimes

    it
    > > changes back.
    > >
    > > is there an option that the pages will be read by IIS/asp.net using a
    > > specific encoding in the configuration of the application.
    > > the problem is that when the pages are saved as ascii and using a
    > > windows-1255 encoding as on the development computer, it does not

    display
    > > correctly.
    > >
    > > please advise.
    > > TIA, z.
    > >
    > >

    >
    >
     
    z f, Dec 26, 2004
    #3
  4. z f

    z f Guest

    anyway i found it and it worked, thanXXXX!!!!!

    "Mikhail Arkhipov (Microsoft)" <> wrote in
    message news:BDF44738.9E95%...
    > ASP.NET runtime does not use any META information in the file. It uses
    > fileEncoding attribute that you can specify in web.config file. Have a

    look
    > here
    >
    >

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
    > vbtskeditingwebconfigfileforwebformsglobalization.asp
    >
    > If fileEncoding attribute is not specified, ASP.NET runtime reads file in
    > default OS codepage unless the file has Unicode or UTF-8 signature.
    >
    > You can work around VS limitation of lack of default encoding by resaving
    > new file templates in Unicode or UTF-8 with signature. Then VS will

    respect
    > file signatures no matter what META element might specify.
    >
    > Thanks
    >
    > Mikhail Arkhipov (Microsoft)
    > -- This post is provided 'AS IS' with no warranties and confers no rights
    >
    > On 12/26/04 10:30, in article #, "z f"
    > <> wrote:
    >
    > > Hi,
    > >
    > > i run a web application in a commercial hosting.
    > > my web app need encoding of hebrew, but the default encoding on the

    hosting
    > > (win2003) is english - westren-european, and my pages are being read as
    > > western european encoding even if i add a content-encoding=windows-1255
    > > which should work.
    > > the only solution i found is to save the pages as unicode, but this is
    > > annoying, because there is no option to set the default page encoding in
    > > visual studio 2003, so i have to change it for each page, and sometimes

    it
    > > changes back.
    > >
    > > is there an option that the pages will be read by IIS/asp.net using a
    > > specific encoding in the configuration of the application.
    > > the problem is that when the pages are saved as ascii and using a
    > > windows-1255 encoding as on the development computer, it does not

    display
    > > correctly.
    > >
    > > please advise.
    > > TIA, z.
    > >
    > >

    >
    >
     
    z f, Dec 26, 2004
    #4
    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. Sriram Mallajyosula

    How do I post data from aspx page to another aspx page.

    Sriram Mallajyosula, Nov 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,045
    Steve C. Orr [MVP, MCSD]
    Nov 5, 2003
  2. Marco Antonio Montalvo Durán
    Replies:
    2
    Views:
    4,224
    Matt Morris
    Jan 23, 2004
  3. John M
    Replies:
    1
    Views:
    1,290
    Kumar Reddi
    May 29, 2005
  4. =?Utf-8?B?Uk1M?=
    Replies:
    1
    Views:
    590
    =?Utf-8?B?QW5keSBMdWtzaWM=?=
    Sep 16, 2005
  5. Progman
    Replies:
    2
    Views:
    1,958
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Feb 13, 2006
Loading...

Share This Page