Why is IE failing to show UTF-8 encoded text?

前端 未结 5 1156
有刺的猬
有刺的猬 2020-12-15 03:55

I have a some Chinese characters that I\'m trying to display on a Kentico-powered website. This text is copy/pasted into Kenticos FCK editor, and is then saved and appears

5条回答
  •  醉梦人生
    2020-12-15 04:36

    I managed to fix the same issue by changing the file's UTF format to "UTF8 With Byte Order Mark".

    (The editor I use allows me to switch file formats easily, not sure how to proceed otherwise, but worth taking a look at the different UTF file formats, IE(8) simply doesn't like UTF8 Without Byte Order Marks...)

    I was also able to reproduce the snippet from the answer above;

    
    
        test
        


    0 0

    But my results were "intermittent" while in UTF-Without BOM (sometimes accents would show up, some other times the weird chars, and it didn't look like a whitespace rendering issue to me...) Note that I was fiddling with lang="fr" and lang="es", but in all cases, changing the UTF file format seems to have permanently resolved my accents display issues. :)

    I'm not 100% familiar with UTF, but if the chars are coded using 2 bytes, one would have to assume that white-space issues and misunderstood chars could be related to misaligned bytes in the sources.

提交回复
热议问题