0

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.

4
  • At validator.w3.org you can click on "more options" >> "show source"... then you can look at line 136 as the validator sees it and go from there. Commented Jun 14, 2010 at 1:19
  • Can you set the W3C flags so that it shows you the source code or look at it yourself? Otherwise, you try to specify the correct encoding in your HTML - e.g. <?xml version="1.0" encoding="UTF-16"?>. Commented Jun 14, 2010 at 1:21
  • I tried the 'show source' but it doesn't show the source. 'Sorry! This document can not be checked.' I have set the encoding type in my HTML: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> Commented Jun 14, 2010 at 1:25
  • Well, try UTF-16. Or provide a link to the page so we can take a look ... Commented Jun 14, 2010 at 1:26

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Line 194 is extracurricular? (edit: oh maaaan no fair, you corrected it!)
I am using dreamweaver so I am not sure... I tried with BOM off and ON same thing... I seem to get missing character symbols in Chrome for umlaut characters and accented vowels in french/spanish.
1

I fixed this with htmlentities() in PHP to make sure the umlaut and accented characters are displayed correctly in html.

1 Comment

Using HTML entities to display UTF-8 characters in a UTF-8 document is unnecessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.