pto: Eleminierung von HTML-Fehlern

Beitrag lesen

<?php
$s = 'ö';
$s2 = preg_replace('/\x{00F6}/u', 'ersetzt', $s);
echo $s2;
?>

ich blick nicht mehr durch jetzt habe ich das so umgesetzt, bloß mit 009f, jetzt streikt der validator ganz und sagt Sorry! This document cannot be checked.  Sorry, I am unable to validate this document because on line 437 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 "\xC3" does not map to Unicode