|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17792 DOMXML outputs ? character before ? - encoding??
Submitted: 2002-06-16 18:02 UTC Modified: 2002-06-17 10:39 UTC
From: douglas_devine at yahoo dot com Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 4.2.1 OS: Redhat 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: douglas_devine at yahoo dot com
New email:
PHP Version: OS:


 [2002-06-16 18:02 UTC] douglas_devine at yahoo dot com
I have a web page with a form. I want the user to be able to use the ? symbol in a text field on the form. I then pass the value of the text field(the ? symbol) to a DOMXML function which creates a XML string which is transformed into XHTML using the XSLT functions.

I have a meta tag defining the encoding of the web page as UTF-8. (So the ? symbol is being passed into the DOMXML function in this format? I echo it out just before doing this and it displays correctly.)

the DOMXML functions use UTF-8 for input and output? When I echo the XML output before passing it to the XSLT functions, I see that it has placed a ? symbol immediately before the ? symbol.

Seems like there might be an encoding problem?

Using Sablotron-0.90, Expat-1.95.3


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-17 04:56 UTC]
Could you please give a short code example, which reproduces this problem. 

And domxml expects and outputs utf8 by default. try it with converting your input to utf-8 before using it with domxml.

 [2002-06-17 10:39 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

Remember that echo's output is ascii.  The ? symbol is not ascii.  Since it's not it is expanded to two bytes.  ? is that second byte.  A true test would be to parse it and output the string that is retrieved.  For a list of what is ascii, and therefore is unchanged when output to UTF-8 see
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 09:01:28 2024 UTC