php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #51279 Documentation is weak at "DOMDocument uses UTF-8"
Submitted: 2010-03-12 08:19 UTC Modified: 2010-10-20 10:53 UTC
From: david dot gausmann at measx dot com Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.3.2 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: david dot gausmann at measx dot com
New email:
PHP Version: OS:

 

 [2010-03-12 08:19 UTC] david dot gausmann at measx dot com
Description:
------------
After using the DOM-Objects (e. g. DOMDocument, DOMNode, ...) for parsing a XML file I got angry, because the source file was iso-8895-1 (and both the DOMDocument->xmlEncoding and DOMDocument->encoding told me "iso-8895-1") but the output was utf-8.
After some minutes I expected that on the Introduction page of DOM the following note is written:
"DOM extension uses UTF-8 encoding. Use utf8_encode() and utf8_decode() to work with texts in ISO-8859-1 encoding or Iconv for other encodings"

Well this node is missing on the pages where the content access is described.
E. g. DOMNode->textContent, DOMNode->nodeValue, DOMElement->GetAttribute, and so forth.


I personally whould like to have an implemented auto-change-encoding to whatever-you-want, but this is not part of the DOM specification. :(


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-20 10:52 UTC] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=304551
Log: Fixed bug #51279 (Documentation is weak at "DOMDocument uses UTF-8")
 [2010-10-20 10:53 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2010-10-20 10:53 UTC] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

I added the note to the common DOM classes; DOMDocument, DOMNode and DOMElement on their synopsis pages.
 [2020-02-07 06:09 UTC] phpdocbot@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=2d4d3da13b811a0485585e413578742a797af268
Log: Fixed bug #51279 (Documentation is weak at "DOMDocument uses UTF-8")
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 01 03:01:28 2024 UTC