foreign character encoding

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

    #1

    foreign character encoding

    im working on an ASP.NET app in VB.NET and have problems with foreign
    characters.
    everything works ok, special characters are presented ok onscreen when typed
    in the body of the page, using html encoding or not, i.e.

    &aacute and á both display an a with an acute symbol

    the problem come when is pass foreign characters using parameters and get
    the using Server.Params or Request.QuerySt ring, they simply disappear.

    a call test.aspx?param =áa&eacu te;e

    should show the param string as áaée, but it only shows it as ae.

    both pages are using utf-8 charset, but i also tryied without it, and didnt
    work either...

    also tryied to encode the querystring using Server.HtmlEnco de(string) and
    Server.URLEncod e(string) before passing it, but nothing...

    my system is configured as any regular us machine, english os, english
    explorer, etc. nothing special there... any hint?


  • Steve C. Orr, MCSD

    #2
    Re: foreign character encoding

    Have you tried setting it to use unicode?
    Here's more info on the subject:
    http://msdn.microsoft.com/library/de...gbasetypes.asp

    Also, have you checked the Globalization section of the web.config?
    Try changing it to something more like this:

    <!-- Web.Config Configuration File -->

    <configuratio n>
    <system.web>
    <customErrors mode="Off"/>
    <globalizatio n
    fileEncoding="i so-8859-1"
    requestEncoding ="iso-8859-1"
    responseEncodin g="iso-8859-1"
    />

    </system.web>

    </configuration>

    --
    I hope this helps,
    Steve C. Orr, MCSD



    "Harley" <harleyobrien%4 0hotmail.com> wrote in message
    news:%23szTg6xU DHA.3312@tk2msf tngp13.phx.gbl. ..[color=blue]
    > im working on an ASP.NET app in VB.NET and have problems with foreign
    > characters.
    > everything works ok, special characters are presented ok onscreen when[/color]
    typed[color=blue]
    > in the body of the page, using html encoding or not, i.e.
    >
    > &aacute and á both display an a with an acute symbol
    >
    > the problem come when is pass foreign characters using parameters and get
    > the using Server.Params or Request.QuerySt ring, they simply disappear.
    >
    > a call test.aspx?param =&aacute;a&eacu te;e
    >
    > should show the param string as áaée, but it only shows it as ae.
    >
    > both pages are using utf-8 charset, but i also tryied without it, and[/color]
    didnt[color=blue]
    > work either...
    >
    > also tryied to encode the querystring using Server.HtmlEnco de(string) and
    > Server.URLEncod e(string) before passing it, but nothing...
    >
    > my system is configured as any regular us machine, english os, english
    > explorer, etc. nothing special there... any hint?
    >
    >[/color]


    Comment

    • Harley

      #3
      Re: foreign character encoding

      the web.config settings did it.
      thank you!

      "Steve C. Orr, MCSD" <Steve@Orr.ne t> wrote in message
      news:eXDQv2zUDH A.3312@tk2msftn gp13.phx.gbl...[color=blue]
      > Have you tried setting it to use unicode?
      > Here's more info on the subject:
      >[/color]
      http://msdn.microsoft.com/library/de...gbasetypes.asp[color=blue]
      >
      > Also, have you checked the Globalization section of the web.config?
      > Try changing it to something more like this:
      >
      > <!-- Web.Config Configuration File -->
      >
      > <configuratio n>
      > <system.web>
      > <customErrors mode="Off"/>
      > <globalizatio n
      > fileEncoding="i so-8859-1"
      > requestEncoding ="iso-8859-1"
      > responseEncodin g="iso-8859-1"
      > />
      >
      > </system.web>
      >
      > </configuration>
      >
      > --
      > I hope this helps,
      > Steve C. Orr, MCSD
      > http://Steve.Orr.net
      >
      >
      > "Harley" <harleyobrien%4 0hotmail.com> wrote in message
      > news:%23szTg6xU DHA.3312@tk2msf tngp13.phx.gbl. ..[color=green]
      > > im working on an ASP.NET app in VB.NET and have problems with foreign
      > > characters.
      > > everything works ok, special characters are presented ok onscreen when[/color]
      > typed[color=green]
      > > in the body of the page, using html encoding or not, i.e.
      > >
      > > &aacute and á both display an a with an acute symbol
      > >
      > > the problem come when is pass foreign characters using parameters and[/color][/color]
      get[color=blue][color=green]
      > > the using Server.Params or Request.QuerySt ring, they simply disappear.
      > >
      > > a call test.aspx?param =&aacute;a&eacu te;e
      > >
      > > should show the param string as áaée, but it only shows it as ae.
      > >
      > > both pages are using utf-8 charset, but i also tryied without it, and[/color]
      > didnt[color=green]
      > > work either...
      > >
      > > also tryied to encode the querystring using Server.HtmlEnco de(string)[/color][/color]
      and[color=blue][color=green]
      > > Server.URLEncod e(string) before passing it, but nothing...
      > >
      > > my system is configured as any regular us machine, english os, english
      > > explorer, etc. nothing special there... any hint?
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...