How are newlines defined in Zope objects? Are they the same across all platforms, or are they platform dependent? If I do a binary FTP download of an object, am I guaranteed to have an exact copy of the original object? -- John
John Poltorak wrote:
How are newlines defined in Zope objects? Are they the same across all platforms, or are they platform dependent?
If I do a binary FTP download of an object, am I guaranteed to have an exact copy of the original object?
It's always done the right thing for me. As far as I can tell, any data stored into a binary field (like File contents) or a string field (Document contents) is stored and returned as presented. ZPTs, being XML, may use \n only. But I do not speak with certainty: do you have experience to the contrary? --jcc -- "He who fights with monsters should look to it that he himself does not become a monster. And when you gaze long into an abyss the abyss also gazes into you."
On Tue, Mar 16, 2004 at 07:06:40PM -0600, J Cameron Cooper wrote:
John Poltorak wrote:
How are newlines defined in Zope objects? Are they the same across all platforms, or are they platform dependent?
If I do a binary FTP download of an object, am I guaranteed to have an exact copy of the original object?
It's always done the right thing for me. As far as I can tell, any data stored into a binary field (like File contents) or a string field (Document contents) is stored and returned as presented. ZPTs, being XML, may use \n only. But I do not speak with certainty: do you have experience to the contrary?
What I am trying to establish is what actually is the right thing, since I don't know. I have a problem uploading news objects using FTP and it may have something to do with newlines. Other object types upload fine. Some people have said that newlines have to be in Unix rather than DOS format, but I'm not sure if that is the case. AFAICT, it is only me who has this problem so I'm trying to establish exactly what Zope (or Plone) expect. What happens currently is that news objects are truncated at the blank line seperating the header from the body text of the file. It seems like a Plone issue, but I get a bunch of abuse when I ask on that list.
--jcc
-- "He who fights with monsters should look to it that he himself does not become a monster. And when you gaze long into an abyss the abyss also gazes into you."
-- John
There's a unix2dos command (google) that'll "fix" the dos file cr/lf. It may help in your testing. (maybe it's dos2unix... that would make more sense :) ) ----- Original Message ----- From: "John Poltorak" <jp@warpix.org> To: <zope@zope.org> Sent: Wednesday, March 17, 2004 9:38 AM Subject: Re: [Zope] Newlines in objects
On Tue, Mar 16, 2004 at 07:06:40PM -0600, J Cameron Cooper wrote:
John Poltorak wrote:
How are newlines defined in Zope objects? Are they the same across all platforms, or are they platform dependent?
If I do a binary FTP download of an object, am I guaranteed to have an exact copy of the original object?
It's always done the right thing for me. As far as I can tell, any data stored into a binary field (like File contents) or a string field (Document contents) is stored and returned as presented. ZPTs, being XML, may use \n only. But I do not speak with certainty: do you have experience to the contrary?
What I am trying to establish is what actually is the right thing, since I don't know.
I have a problem uploading news objects using FTP and it may have something to do with newlines. Other object types upload fine.
Some people have said that newlines have to be in Unix rather than DOS format, but I'm not sure if that is the case. AFAICT, it is only me who has this problem so I'm trying to establish exactly what Zope (or Plone) expect. What happens currently is that news objects are truncated at the blank line seperating the header from the body text of the file.
It seems like a Plone issue, but I get a bunch of abuse when I ask on that list.
--jcc
-- "He who fights with monsters should look to it that he himself does not
become a monster. And when you gaze long into an abyss the abyss also gazes into you."
-- John
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
John Poltorak wrote:
How are newlines defined in Zope objects? Are they the same across all platforms, or are they platform dependent?
If I do a binary FTP download of an object, am I guaranteed to have an exact copy of the original object?
Hmmm, what is leading you to ask these questions? ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (4)
-
Bobb -
Chris Withers -
J Cameron Cooper -
John Poltorak