[Pmwiki-users] value for $Newline ?

Patrick R. Michaud pmichaud
Thu Jan 29 12:42:14 CST 2004


On Thu, Jan 29, 2004 at 11:23:53AM -0500, Lloyd Budd wrote:
> 
> On 28-Jan-04, at 20:48, Patrick R. Michaud wrote:
> 
> >On Wed, Jan 28, 2004 at 09:55:12AM -0500, Lloyd Budd wrote:
> 
> >If it's the choice of newline token (?) that is the problem, you can  
> >change
> >this to whatever you want by setting $Newline in local.php.
> 
> I am guessing that it can be set as (almost) anything but a newline (  
> \n , '0x0a') and still function well.  Still, I wanted to test this,  
> but I am not sure what value to use for $Newline.

Well, it can be anything but a newline, but you also want it to be something
that won't occur in the markup text itself.

> I looked at a copy of release notes that including  a description of  this
> http://contra.vosn.net/pipermail/pmwiki-users_pmichaud.com/2003-July/000798.html
> "\262"
> $Newline="\276" (0xfe)
> - is octal notation?  but 0xfe is o'376'

Yeah, it was a typo in the message--the very next message issued
a correction.  Amazing how these little mistakes can live to haunt me
forever.  :-) :-)

> Any suggestions?

Well, if you're in a Unix environment and you're just wanting to extract
the markup text from the files, you can always do something like

   grep '^text=' Group.SomePage | tr '\262' '\012'

which gives back the markup text of Group.SomePage with all of the ?
tokens converted to newlines.  Or, you can always issue a page request
to the server with ?action=source in the URI and that will send back the
markup text.  (But somehow I'm guessing that perhaps you want the other 
attributes of the page in addition to the markup text...?)

Pm



More information about the pmwiki-users mailing list