Newlines.html #1

  • //
  • guest/
  • timothee_besset/
  • docs/
  • html/
  • VCP/
  • Newlines.html
  • View
  • Commits
  • Open Download .zip Download (3 KB)
<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 &quot;\n&quot; endings internally
for both content and patches.  Due to XML handling, any &quot;\r\n&quot; or &quot;\r&quot;
sequences that sneak in to an XML file get converted to &quot;\n&quot; anyway.

<dt><a name="3_"><strong><p>3.

</strong></a><dd>RevML binary files use an escape like &lt;char code=&quot;0x0d&quot;/&gt; 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 &quot;\n&quot; to &quot;\r\n&quot;
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 &quot;\r\n&quot; and &quot;\r&quot; in to &quot;\n&quot;
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 4040 timothee_besset guest branch
//guest/perforce_software/revml/docs/html/VCP/Newlines.html
#2 2307 Barrie Slaymaker get VCP::Filter::map working, update docs
#1 1993 Barrie Slaymaker Check in HTML documentation