|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47368 XMLWriter::writeAttribute() doesn't display accented characters
Submitted: 2009-02-12 12:32 UTC Modified: 2009-02-12 18:35 UTC
From: christian dot ubu at gmail dot com Assigned:
Status: Not a bug Package: XML Writer
PHP Version: 5.2CVS-2009-02-12 (CVS) OS: CentOS release 5.2 (Final)
Private report: No CVE-ID: None
 [2009-02-12 12:32 UTC] christian dot ubu at gmail dot com
XMLWriter::writeAttribute() doesn't display the value of the attribute with accented characters.

Reproduce code:

$w = new XMLWriter();
$w->writeAttribute('test?', 'test?');


Expected result:
<test test?="test?"/>

Actual result:
<test test?="test&#x9005;&#10;&#x59;"/>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-12 18:35 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

certain characters get written as character references within attribute 
values. That happens to one of them. Also make sure your encodings are 
correct because when run within UTF-8 env, the output is:
<test test?="test&#xE9;"/>
which is correct
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 02:01:27 2024 UTC