FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Problem with appendChild and ellipsis...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Problem with appendChild and ellipsis... [message #173078 is a reply to message #173077] Sun, 20 March 2011 19:25 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 3/20/2011 2:24 PM, Dennis wrote:
> <?php
>
> foo();
> echo "test done<br>";
> exit;
>
> function foo()
> {
> $doc = new DOMDocument();
> $doc->formatOutput = true;
>
> $title = $doc->createElement("title");
> $doc->appendChild($title);
>
> $title_data = "Some data followed by an ellipses…";
>
> $title_text = $doc->createTextNode($title_data);
> $title->appendChild($title_text);
>
> $doc->saveXML();
> $doc->save("test.xml");
>
> echo "foo done<br>";
> }
>
> ?>

OK, running your code I get the following messages:

Warning: DOMDocument::saveXML(): string is not in UTF-8 in
C:\temp\domdoctest.php on line 20

Warning: DOMDocument::save(): string is not in UTF-8 in C:\temp
\domdoctest.php on line 21

Your problem is that the character you are using has no UTF-8
equivalent. You can't use characters not in the current charset.

Whenever I need ellipses I just use three periods (...).

BTW - if you had display_errors=on and error_reporting=E_ALL in your
php.ini file you would have seen these messages. I highly recommend
they be enabled on all development systems (but not production).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: PHP Module Writing Help
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 18:32:19 GMT 2024

Total time taken to generate the page: 0.04795 seconds