php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40554 DomElement->set_attribute() for french characters
Submitted: 2007-02-20 10:42 UTC Modified: 2007-02-22 11:35 UTC
From: vijijvs at yahoo dot co dot in Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 4.3.9 OS: Mandrake linux
Private report: No CVE-ID: None
 [2007-02-20 10:42 UTC] vijijvs at yahoo dot co dot in
Description:
------------
When "/home/viji/Endroit de protection de caract?res sp?ciaux" is passed as argument to DomElement->set_attribute() function, the french letters ? and ? get converted into 貥 and 飩. 

Php version im using is 4.3.9 and Apache 1.33.


Note:
=====

Tried by using utf8_encode() and utf8_decode() before setting value for the attribute.

Reproduce code:
---------------
DomElement->set_attribute(Name, "/home/viji/Endroit de protection de caract?res sp?ciaux");

Expected result:
----------------
<Location><Path Name="/home/viji/Endroit de protection de caract?res sp?ciaux" /></Location>

Actual result:
--------------
<Location><Path Name="/home/viji/Endroit de protection de caract&#x8CA5;s sp&#x98E9;aux" /></Location>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-20 10:48 UTC] tony2001@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 [2007-02-22 11:25 UTC] vijijvs at yahoo dot co dot in
Wants to fix with this version itself.

Updating to latest version leads to problem in our environment and it is quite risk.
 [2007-02-22 11:30 UTC] vijijvs at yahoo dot co dot in
Any workaround for this?
 [2007-02-22 11:35 UTC] tony2001@php.net
We can't fix something that was released years ago.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 14:01:29 2024 UTC