Character Encoding Issue - Strange Behaviour From Pound Signs (£) with UTF-8 IE6 / ASP / XML

前端 未结 2 893
星月不相逢
星月不相逢 2020-12-17 05:17

I am having a very strange problem with pound signs displaying incorrectly (or not at all) on a web page.

I am keying text in a textbox, which then gets (briefly) st

2条回答
  •  爱一瞬间的悲伤
    2020-12-17 06:02

    I am keying text in a textbox, which then gets (briefly) stored in XML before being displayed in a new IE(6) window.

    The problem is most likely embedded in this sequence. It would help if you could elaborate the specifics of how this sequence is acheived.

    The most common cause for this sort of problem is a mismatch in an understanding between what a client actually encodes a character as and what the server thinks the encoding is. The simplest solution to this is to place the accept-charset attribute on the form element which makes the character encoding of a post explicit.

    The text posted in the stuff field will be encoded in utf-8.

    The reason for some inconsitencies are:-

    1. It possible that the server can code the characters in the db incorrectly but then when sending those same characters to a browser reverse the corruption, things look fine again on the browser.
    2. ISO-8859-1 means different things in different places. IE6 is somewhat loose with that character set, and will actually treat is as Windows-1252. Other applications place a sctricter interpretaion on ISO-8859-1.

提交回复
热议问题