Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
Example Code:
<?php
$doc = new DOMDocument();
$doc->loadXML('<?xml version="1.0" encoding="Windows-1252"?><root />');
$doc->documentElement->appendChild($doc->createElement('füürüü', 'ärööö'));
echo $doc->saveXML();
With the current preview configuration this creates the following error and as the following example-output shows, stops output at the problematic position:
DOMDocument::saveXML(): output conversion failed due to conv error, bytes 0xFC 0xFC 0x72 0xFC
<?xml version="1.0" encoding="Windows-1252"?>
<root><f
When PHP comes with the iconv extension this is no problem. Additionally this offers recoding support for diverse character-encodings which often is necessary for webapplications.
Even though this is an XML example, DOM also supports HTML and the encoding chosen in the example (Windows-1252; CP1252) is the default for HMTL5 so it would be a bit of a pity to not have support for that, it's nothing that specific by far.
Iconv Extension:
Link:
Link: