|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44700 foreign characters creates linesplit in xml_set_character_data_handler
Submitted: 2008-04-11 14:23 UTC Modified: 2008-04-11 18:42 UTC
From: tr-huso at online dot no Assigned:
Status: Not a bug Package: *XML functions
PHP Version: 5.2.5 OS: Linux Ubuntu 7.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
48 + 28 = ?
Subscribe to this entry?

 [2008-04-11 14:23 UTC] tr-huso at online dot no
XML-files containing foreign keys like ?, ? and ? makes the xml_set_character_data_handler splits the line in two.

PHP is standard set up in Ubuntu version 7.10.

This is sort of the same bug as #30951, but this case is closed.

Reproduce code:
I based my code on Example 2. Map XML to HTML to parse information from the XML-file.

Just create a document with the foreign keys ?. ? and ? and you should pretty much be able to recreate the bug.

Instead of using echo insert the value in the code into a string or end all echos with a <br>

Expected result:
I expected that the line that included the foreign character was returned in whole, not splitted with a line feed.

Actual result:
it returns a line feed.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-11 18:42 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

handler.php :

"Character data handler is called for every piece of a text in the XML 
document. It can be called multiple times inside each fragment (e.g. for 
non-ASCII strings)."

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 09 08:01:29 2023 UTC