Re: Re: ampersand in dom with utf-8

From: Date: Sat, 15 Oct 2005 19:26:00 +0000
Subject: Re: Re: ampersand in dom with utf-8
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-224188@lists.php.net to get a copy of this message
So I'm reading up on character encoding in XML documents as I think this is the problem (after the many helpful suggestions on this list). With regards to your second question; no, I'm not sure if I'm using proper utf-8 througout the entire process. When I input from the form I'm converting everything via htmlentities . This is why I'm getting è etc... (On a side note, is there a function or way to check to see if a form is using the native characters (from a copy and paste of a word document like è) or the HTML entity è . I've changed the content-type from text/xml to application/xml but that doesn't seem to help. As only UTF-8 and UTF-16 have to be supported, I'm concerned whether the processor might think it is some other encoding. The HTTP headers are: Date => Sat, 15 Oct 2005 17:49:02 GMT Server => Apache/1.3.33 (Unix) mod_jk/1.2.8 PHP/5.0.4 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7a X-Powered-By => PHP/5.0.4 Cache-Control => no-cache Connection => close Content-Type => application/xml I guess pursuant to cc's suggestion, I should do an html_entity_decode when I make the xml document and then do another htmlentities on the html representatoin. -jonathan On Oct 14, 2005, at 4:22 PM, Jasper Bryant-Greene wrote:
jonathan wrote:
the real characters (presumably è) won't render correctly.
Are you outputting the correct character set information (UTF-8), and are you sure that UTF-8 is being used throughout the entire process? --Jasper Bryant-Greene General Manager Album Limited a: Freepost Album, PO Box 579, Christchurch 8015, New Zealand p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303 e: jasper@album.co.nz w: http://www.album.co.nz/ --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#224188) next »