简体   繁体   中英

w3c validation error with utf-8

When I try to validate a certain page I get the below error:

Sorry, I am unable to validate this document because on line 136 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication. The error was: utf8 "\\xFF" does not map to Unicode

What exactly does this mean and how can I find out what character is causing the problem?

The page is generated dynamically in PHP and a bit large and I am not sure what to look for.

EDIT:

I get missing character symbols for umlauts and french/spanish accented vowels.

Does your text editor save the file with BOM? If so unset that setting and resave it. I think this is it.

Otherwise try going to line 136, possibly with a different editor and delete any weird square symbols, or whole lines.

我使用PHP中的htmlentities()修复了此问题,以确保在html中正确显示变音符和带重音的字符。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM