<html><head><title>VCP::Newlines - Newline, ^Z, and NULL handling in VCP</title></head><body><h1><a name="NAME">NAME </a></h1><p>VCP::Newlines - Newline, ^Z, and NULL handling in VCP <p><hr><h1><a name="DESCRIPTION">DESCRIPTION </a></h1><p>Newlines can be a bear to debug, since most display programs hide the difference between <code>\r\n</code>, <code>\r</code>, and <code>\n</code> from you. <p>VCP copes with newlines thusly: <dl><dt><a name="1_"><strong><p>1. </strong></a><dd>When reading/writing repositories (Cvs, Perforce, etc), it lets them sweat the details. <dt><a name="2_"><strong><p>2. </strong></a><dd>RevML text (non-binary) files always use single newline "\n" endings internally for both content and patches. Due to XML handling, any "\r\n" or "\r" sequences that sneak in to an XML file get converted to "\n" anyway. <dt><a name="3_"><strong><p>3. </strong></a><dd>RevML binary files use an escape like <char code="0x0d"/> to encode carriage returns and other character codes illegal in XML texts. <dt><a name="4_"><strong><p>4. </strong></a><dd><a href="Source/revml.html">VCP::Source::revml</a> can be asked to convert "\n" to "\r\n" on the fly in text files. It never does this by default because most modern-day editors do the right thing (<code>notepad.exe</code> is *not* modern day :). <dt><a name="5_"><strong><p>5. </strong></a><dd><a href="Dest/revml.html">VCP::Dest::revml</a> always converts "\r\n" and "\r" in to "\n" for consistancy's sake, so the RevML file extracted on a Windows machine should be identical (or at least more nearly so) to one extracted on a Unix machine. The metadata might differ a bit, of course, but at least the content won't. </dl><p>Embedded Control-Z characters <code>^Z</code> (ASCII 26) are passed through, as are embedded NULLs. Both the diff and patch code are ^Z and NULL clean as well (unlike many). <p><code>vcp</code> treats all files as binary files and uses it's own <code>\r\n</code> conversion routines specifically to be able to pass <code>^Z</code> through unmolested, since not passing things through can mess up both end users with loitering <code>^Z</code> characters and <code>vcp</code>'s checksums. <p>If you think you have issues like these, see the document <a href="Maintenance.html">VCP::Maintenance</a> for some options and tools that can help when debugging. <p><hr><i><font size="-1">Last updated: Fri Nov 8 13:07:23 2002</font></i></body></html>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 6118 | Dimitry Andric | Integ from //public/revml to //guest/dimitry_andric/revml/main. | ||
//guest/perforce_software/revml/product/Newlines.html | |||||
#1 | 4311 | alan_teague |
Initial versions of productization files and scripts. All are draft quality submitted for review. |