将数据编码为UTF-8

I am getting an encoding error from an XML file generated from a XMLWriter. However I am sure that I can fix this error by converting the data from whatever encoding it is at the moment to UTF-8 encoding.

I would be greatful if you could tell me how to do this.

The error is

This page contains the following errors:

error on line 2 at column 721: Encoding error
Below is a rendering of the page up to the first error.

The code on line 2 at column 721 is <street>Mall CafÈ</street>.

My code to do this is:

$xml = new XMLWriter();

$xml->openURI("stores.xml");
$xml->startDocument("1.0");
$xml->startElement("stores");

while ($row = mysql_fetch_assoc($res)) {
$xml->startElement("store");
  $xml->startElement("type");

  $xml->writeRaw($row['type']);

  $xml->endElement();

 $xml->startElement("name");

  $xml->writeRaw($row['name']);

  $xml->endElement();

   $xml->startElement("street");

  $xml->writeRaw($row['street']);

  $xml->endElement();

   $xml->startElement("address1");

  $xml->writeRaw($row['address1']);

  $xml->endElement();

   $xml->startElement("address2");

  $xml->writeRaw($row['address2']);

  $xml->endElement();

   $xml->startElement("county");

  $xml->writeRaw($row['county']);

  $xml->endElement();

   $xml->startElement("postcode");

  $xml->writeRaw($row['postcode']);

  $xml->endElement();

   $xml->startElement("number");

  $xml->writeRaw($row['number']);

  $xml->endElement();

   $xml->startElement("latlong");

  $xml->writeRaw($row['latlong']);

  $xml->endElement();
  $xml->endElement();
}

$xml->endElement();
$xml->endDocument();
header ("Content-Type: text/xml");
$xml->flush();
?>
            $writer->startDocument("1.0", "UTF-8");