The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

VCP::Newlines - Newline, ^Z, and NULL handling in VCP

DESCRIPTION

Newlines can be a bear to debug, since most display programs hide the difference between \r\n, \r, and \n from you.

VCP copes with newlines thusly:

  1. When reading/writing repositories (Cvs, Perforce, etc), it lets them sweat the details.

  2. 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.

  3. RevML binary files use an escape like <char code="0x0d"/> to encode carriage returns and other character codes illegal in XML texts.

  4. VCP::Source::revml 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 (notepad.exe is *not* modern day :).

  5. VCP::Dest::revml 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.

Embedded Control-Z characters ^Z (ASCII 26) are passed through, as are embedded NULLs. Both the diff and patch code are ^Z and NULL clean as well (unlike many).

vcp treats all files as binary files and uses it's own \r\n conversion routines specifically to be able to pass ^Z through unmolested, since not passing things through can mess up both end users with loitering ^Z characters and vcp's checksums.

If you think you have issues like these, see the document VCP::Maintenance for some options and tools that can help when debugging.