Bug #17792 Updated: DOMXML outputs  character before £ - encoding??

From: Date: Mon, 17 Jun 2002 14:39:15 +0000
Subject: Bug #17792 Updated: DOMXML outputs  character before £ - encoding??
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10872@lists.php.net to get a copy of this message
ID: 17792 Updated by: jtate@php.net Reported By: douglas_devine@yahoo.com -Status: Feedback +Status: Bogus Bug Type: DOM XML related Operating System: Redhat 7.1 PHP Version: 4.2.1 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php 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 http://www.mindspring.com/~jc1/serial/Resources/ASCII.html Previous Comments: ------------------------------------------------------------------------ [2002-06-17 04:56:01] chregu@php.net 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-16 18:02:19] douglas_devine@yahoo.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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17792&edit=1

« previous php.bugs (#10872) next »