On 13 Feb 2005 05:50:26 -0800,
jamais.content@tele2.fr (Jamais-Content) wrote:
[color=blue]
>I currently use the DOM from PHP5 to create XHTML documents.
>I have a problem with entities. I would like to create a node :
><input id="place" value="café rouge">
>To do that I simply create the node with createElement, and then :
> $node -> setAttribute ("value", $val);
>If I set $val = "café rouge", the saveXML causes PHP to fail with an
>error message. The accentuated character seems to be a problem.
>If I set $val = "café rouge", saveXML automatically replaces
>the & with & and that's not what I expect either.
>Any idea ?[/color]
Perhaps the same as:
http://groups-beta.google.com/group/...3c4f0d12e093fc
i.e. you need to utf8 encode before passing to the DOM functions.
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool