![]() |
|||||
|
|
|||||
|
|
Subscribe: Do you want to be among the first to know when something new comes up? Sign up now to receive SnapshotCM News! |
|
|
SnapshotCM Tips and TricksText and binary file handling in SnapshotCMFor most users in most situations, SnapshotCM's handling of text and binary files just works. The user does nothing special and everything works the way they expect. But occasionally, in specialized situations, one requires a clear understanding of how SnapshotCM decides whether a file is text or binary and how text and binary files are treated differently. Read on for the details! What's the DifferenceThe first thing to understand is that text and binary files are treated differently in two ways:
These are the only differences between text and binary files. If EOL editing is inappropriate for a file that otherwise appears to be text, it should be explicitly set to binary type during import. Automatic Text / Binary Type DeterminationAt initial import, a file is scanned for signs of it being binary as well as for signs of it being a reasonable text file. For example, files with any bytes with values 00 through 05 are considered to be binary. Similarly files with regular end-of-line characters are considered to be text. If there are signs a file is binary, or no signs of it being text, it is treated as a binary file. The one common situation where this can do the "wrong" thing is with a zero length file which has no data to examine. SnapshotCM sets a binary file type when importing a zero length file. Another situation where you might need to override the default is when you have text files used in a multiplatform environment, where the end-of-line sequence must remain fixed. In this case, force import as binary to prevent EOL editing by SnapshotCM. You can override SnapshotCM's defaults at import time and force a binary import in the GUI by selecting the "Force binary import" check box in the Import dialog. You also can explicitly select binary or text during a command-line import using the wci command. Once imported, the type also can be changed, though beware that importing a binary file as text can corrupt the file during import. SnapshotCM just does the right thing for most situations. And by providing a per-workspace setting to control how EOL characters are written, and the text/binary setting to specify whether or not any editing occurs on a particular file, SnapshotCM provides the capabilities you need to handle those special cases when they arrive. |
|
|
|
|||||
![]() |
|||||
|
Mailing Address: True Blue Software Company - 5214 Keystone Creek Court
- Fort Collins, CO 80528 - USA Telephone: 970-223-1200 - FAX: 970-223-9270 E-Mail: sales@truebluesoftware.com - support@truebluesoftware.com © 2oo5 True Blue Software Company. All rights reserved. |
|||||