Re: requestEncoding = "ISO-8859-1"

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



Thus wrote Juan,

Joerg,

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

You never came back to me ;-)

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.

That happens whenever actual request encoding and expected request encoding don't match, and it breaks with practically any combination of encodings other than those that happen to be compatible, like US-ASCII/actual and UTF-8/expected.


Whenever you find that for an expected encoding <e1> a web form's form data is corrupted, but switching to encoding <e2> on the server-side solves the problem, all that you do is adjust the server side to the client side. The point is that the client should have used <e1>.

(Why is it that <e2> always seems to be ISO-8859-1? Because that's the default all browsers implement...)

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.

Yes, but this is completely irrelevant in case of Mark's problem. Maybe I wasn't clear enough: With HTML form I meant the plain HTML file. That's where you need a META-Tag, because that's the form that uses the wrong encoding.

Adding a META tag in an ASP.NET web forms isn't useful, as ASP.NET generates an appropriate HTTP Content-Type header like "Content-Type: text/html; charset: utf-8", which thankfully overrides any META tag.

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

Well, there's http://www.microsoft.com/spain ;-)

But I'll be happy to use that topic for my starving blog. Give me a week or so, OK? I'll also revew that stuff we looked into last year.
--
Joerg Jooss
news-reply@xxxxxxxxxxxxx


.



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: requestEncoding = "ISO-8859-1"
    ... I think you're fooling yourself and using standard HTML, instead of ASPX. ... setting the encoding to iso-8859-1 in web.config. ... Setting it to utf-8 has never displayed those charcters for me. ...
    (microsoft.public.dotnet.framework.aspnet)
  • 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: Standard character attributes for Hebrew?
    ... just ask Word to save as HTML with UTF-8 encoding, ... they have nothing to do with the encoding UTF-8. ... When you choose Unicode UTF-8 as encoding, ...
    (comp.infosystems.www.authoring.html)
  • Re: Where to get BeautifulSoup--www.crummy.com appears to be down.
    ... Beautiful Soup uploaded to my website: ... obtaining a sensible parse tree in the face of common HTML errors. ... the encoding of an HTML or XML document, ... appears after this Tag in the document.""" ...
    (comp.lang.python)