On Saturday, December 14, 2013, Robert Cailliau
<
caillia...@gmail.com> wrote:
>There are LFs: decimal 10.
>
>But I just found my answer and thereby two "bug/features" to report:
>The Open dialog has a check-box "Translate line breaks" which was checked.
>The manual (10.5.4) states "When this option is selected,
>BBEdit translates Windows or Unix line breaks..." (but does not
>specify into what; it must be Mac CRs)
>and also states "Unlike the other options in the Open dialog,
>the setting of this option is not preserved between uses of the
>Open command,..." which is true since it always falls back to
>translating. Which I do not want.
What problem are you trying to solve?
>The last set of BBEdit's preferences is about "Text Files" and
>there one can choose one of three radio buttons
>Unix/Classic/Windows, but it is unclear what effect that choice has.
That setting establishes the default line-break type for new documents.
>BBEdit cannot store some indication with the file to remember
>which type of line breaks to use.
That information is derived from the file's contents; namely,
which characters it uses for a line break. For performance and
practicality reasons, BBEdit examines the first line break in
the file and uses this as the basis of its determination. If
you're writing files programmatically, and the first line break
you write out is a carriage return ("\r", ASCII 13, \015, etc)
then the file will be interpreted as such. You probably want to
use a line feed ("\n", ASCII 10, \012), and do so consistently.
Attempting to store line break format external to the file would
be unreliable and fragile.
R.
--
Rich Siegel Bare Bones Software, Inc.
<
sie...@barebones.com> <
http://www.barebones.com/>
Someday I'll look back on all this and laugh... until they
sedate me.