Re: requestEncoding = "ISO-8859-1"

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I think you're fooling yourself and using standard HTML, instead of ASPX.

If you remove the action attribute ( action="FormReceive.aspx" )
and set the encoding to utf-8 in web.config, you'll see that
the accented characters are *not* displayed.

ASPX forms don't need to have the action attribute set.

The code-behind you included isn't being processed at all, given that
you don't have a Page directive to indicate that it be processed.

So, while the META tag *does* work for the HTML which is processed
in that page, ASP.NET has nothing to do with that processing.

re:
I'm still baffled on what is the RIGHT solution.

For HTML what you did works, but not for ASPX.

For ASPX, the only way I've found which works is
setting the encoding to iso-8859-1 in web.config.

Setting it to utf-8 has never displayed those charcters for me.



Juan T. Llibre
ASP.NET MVP
ASPNETFAQ.COM : http://www.aspnetfaq.com
==================================
"Mark" <markfield88@xxxxxxxxxxxxx> wrote in message news:%23Pvc7jLLGHA.3276@xxxxxxxxxxxxxxxxxxxxxxx
I placed the META tag in the .html page, not the .aspx page, and this appears to have solved the
problem. I have attached the HTML in a text file, as this email was not very excited about holding
html tags. It includes several Spanish words - don't get too caught up in my inability to write a
coherent sentence. Thank you!

HOWEVER - I'm still baffled on what is the RIGHT solution. Do I hard code UTF-8 into the meta tag
of every form our staff creates? Or do we just change our web.config to support ISO-8859-1
instead of UTF-8? Both smell like hacks...

Thanks again.

Mark



"Juan T. Llibre" <nomailreplies@xxxxxxxxxxx> wrote in message
news:%23zO1oPELGHA.3972@xxxxxxxxxxxxxxxxxxxxxxx
Joerg,

We've had this conversation before, but never resolved it.

What I've found, in my experience, is that ASP.NET settings take
precedence over HTML settings and, thus, utf-8 doesn't display
characters 128-255 as you say itshould.

If I include
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
in an aspx page source, the setting which prevails is the one specified
in web.config.

Can you post a complete page example which proves what you're saying ?



Juan T. Llibre
ASP.NET MVP
ASPNETFAQ.COM : http://www.aspnetfaq.com
==================================
"Joerg Jooss" <news-reply@xxxxxxxxxxxxx> wrote in message
news:94fc5071122c48c7fa53174ba20a@xxxxxxxxxxxxxxxxxxxxxxx

Don't be. All that happens is that your HTML form likely doesn't specify any encoding, thus your
browser assumes ISO-8859-1 by default (check your browser's encoding option after loading the
form!).
HTML 4.01 even includes an attribute to specify the character encoding for a submitted web form
("accept-charset"), but last time I checked it was practically unsupported. What happens instead
is that the original response encoding (ISO-8859-1 assumed if not specified) is used as
subsequent
request encoding.

Therefore, simply mark your static HTML as UTF-8 encoded as well (and of course encode them
physically using UTF-8 as well!):
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">

That should do the trick.
Joerg Jooss







.



Relevant Pages

  • Re: stand or sit?
    ... > citations can be properly formatted, but I'd prefer UTF-8 as my ... > foreign-language characters in HTML entities, ... > the characters in htmlspecialcharsas well). ... > handlers for encoding using the HTML entity lookup table. ...
    (soc.motss)
  • Re: diacritic html
    ... In Tools | Options | General, click Web Options, go to Encoding, you should ... be able to tell it to use UTF-8. ... Set the language encoding for a Web page ... ALL HTML looks like rubbish to me! ...
    (microsoft.public.word.docmanagement)
  • RE: UTF-8 Encoding
    ... As for the encoding for ASPX page in VS.NET/ ASP.NET RUNTIME, ... The strings we hardcoded in code file .cs or .vb are compiled into bytes at ... UTF-8 encoded and batch convert a set of file to UTF-8? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: DotNet & Netscape4
    ... in play once the HTML code moved to the browser. ... When ASPX sends the file, ... it sends an encoding information in the HTTP header. ... To test remove the "meta" from your HTML file. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: requestEncoding = "ISO-8859-1"
    ... precedence over HTML settings and, thus, utf-8 doesn't display ... That happens whenever actual request encoding and expected request encoding don't match, and it breaks with practically any combination of encodings ... With HTML form I meant the plain HTML file. ... utf-8", which thankfully overrides any META tag. ...
    (microsoft.public.dotnet.framework.aspnet)