[phpxmlrpc] Newline issue

Crisses crisses-xmlrpc at kinhost.org
Thu Feb 6 21:13:27 EST 2014

Thanks for a quick answer.  I figured that was the ASCII for LF/newline.  Unfortunately Ecto is displaying them as "#10" instead of displaying a newline.  I thought I was doing something wrong, or at least others would have a similar issue and know how to fix it.

Do you know where the newlines are being encoded?  I dumped the $EditText string to my log right before sending it to xmlrpcval and it has \n, not ascii encoding.  i.e.:

"Some sample products:\n\n(:div class="flex-container":)\n(:div1 class="flexslider":)\n* %list slides% Attach:birdlove-med.jpg\n* Attach:bugpaw-med.jpg\n* Attach:cheetahs-med.jpg\n* Attach:chewtoy-med.jpg\n* Attach:Chicken-med.jpg\n(:div1end:)\n(:div:)\n\n[[!My Products]]\n(:title Products:)"\n

<value><string>Some sample products:

(:div class="flex-container":)
(:div1 class="flexslider":)
* %list slides% Attach:birdlove-med.jpg
* Attach:bugpaw-med.jpg
* Attach:cheetahs-med.jpg
* Attach:chewtoy-med.jpg
* Attach:Chicken-med.jpg

[[!My Products]]
(:title Products:)</string></value>

And finally, in Ecto:

Some sample products:#10#10(:div class="flex-container":)#10(:div1 class="flexslider":)#10* %list slides% Attach:birdlove-med.jpg#10* Attach:bugpaw-med.jpg#10* Attach:cheetahs-med.jpg#10* Attach:chewtoy-med.jpg#10* Attach:Chicken-med.jpg#10(:div1end:)#10(:div:)#10#10[[!My Products]]#10(:title Products:)

Where is the ascii translation taking place?  Is there a way to stop it from encoding the newlines?

Thanks again!


On Feb 6, 2014, at 7:31 PM, Ken Almond wrote:

>> newlines \n recoded to 

> 10 is the ASCII code for LF (e.g. newline) - I'm not sure if you are trying
> to avoid \n(s) or expect them to be a different value. 
> -----Original Message-----
> From: phpxmlrpc-bounces at lists.usefulinc.com
> [mailto:phpxmlrpc-bounces at lists.usefulinc.com] On Behalf Of Crisses
> Sent: Thursday, February 06, 2014 3:40 PM
> To: phpxmlrpc at lists.usefulinc.com
> Subject: [phpxmlrpc] Newline issue
> Hi,
> I'm new here -- thanks for a great package.
> I'm working on MetaWeblog support for PmWiki -- we had Blogger support with
> XMLRPC years ago, the package maintainer disappeared and I'm trying to bring
> it up-to-date.
> I've got some of it working, but the contents of the page are coming through
> with newlines \n recoded to 

> I tried specifying "string", but that didn't help.
> Is there a php encoding I should run on the string first, or class method I
> should be using?  In the code below, it's "description" that has the
> problem.  The text being sent should be RichText or plain text on the other
> end: newlines need to be preserved.  I'm testing out my XMLRPC on the Ecto
> console.
> Thank you!!!
>    return new xmlrpcval(
>                    array(
>                          "postid" => new xmlrpcval($page['name']),
>                          "title" => new xmlrpcval($title),
>                          "userid" => new xmlrpcval($page['author']),
>                          "dateCreated" => new xmlrpcval($lastmodified,
> "dateTime.iso8601"),
>                          "description" => new xmlrpcval("$EditText",
> "string"),
>                          "link" => new xmlrpcval($link),
>                          ),"struct");
> Crisses
> _______________________________________________
> phpxmlrpc mailing list
> phpxmlrpc at lists.usefulinc.com
> http://lists.usefulinc.com/cgi-bin/mailman/listinfo/phpxmlrpc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.usefulinc.com/pipermail/phpxmlrpc/attachments/20140206/425aa224/attachment.html>

More information about the phpxmlrpc mailing list