On 2/28/07 Manuel Souto Pico wrote:
>...
>But now I needed to upload some text files to an application which
>expects a \n at the end of each new line and it didn't work. I had to
>find and replace \r with \n in all the documents that I needed to
>upload.
>
>I would be handy not to have to do that and get a \n instead of a \r
>whenever I click enter in BBedit. What am I doing wrong? Aren't my
>preferences well chosen? Is there any other option that I'm
>overlooking?

Take these things into account:

1. BBEdit always uses \r for newlines when it presents a file in an open
window. So if you search within BBEdit, that's what you'll find.

2. When BBEdit saves or closes a file, it restores the newlines to
whatever character(s) they were in the original, unless you've
deliberately changed them. 

3. Other applications and languages have their own ways of handling
newlines. In Perl, for example, "\n" stands for the newline used in the
operating system in which Perl is executing. In Linux/UNIX (including OS
X), Perl's "\n" is a linefeed (LF), in Windows/DOS it's carriage
return-linefeed (CRLF), and in Mac Classic it's a carriage return (CR).

So the first question to ask is: when you say your application didn't
work, what system was it executing in, and what system created the file
(that is, which system's newline is used in the file)? What you're
describing sounds like a mismatch of these.

How are you uploading the test files? With an FTP client, if you upload
as text/ASCII, the file's newlines will be converted for you; if you
upload as binary/raw data, the newlines won't be changed.

There are various ways to convert the newlines of a batch of files, but
I'm not sure you really need to do manual conversions...

If the above doesn't help, then we need more information about your
files and the application that doesn't work.

- Bruce

__bruce__van_allen__santa_cruz__ca__

--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to