Become a Site Supporter and Never see Ads again!

Author Topic: questions about .txt files...  (Read 7147 times)

0 Members and 1 Guest are viewing this topic.

Offline Shadow_7

  • Trade Count: (0)
  • Taperssection Member
  • ***
  • Posts: 310
Re: questions about .txt files...
« Reply #15 on: April 25, 2011, 09:08:27 AM »
LF = line feed character = \n
CR = carriage return character = \r
CRLF = carraige return plus line feed = \r\n

This ^^^

Basically mac terminates text lines with \r   
(0x0D)

And *nix terminates text lines with \n 
(0x0A)

And DOS / windows / PC terminates text lines with \r\n 
(0x0D)
(0x0A)

In *nix, there's unix2dos and dos2unix to swap between the two at least for *nix and winders.  Many word processors are aware of such things so you can import / open them with a word processor, then cut and paste it into a new .txt file with the appropriate \r or \n or \r\n for your OS.  Many means to an end.

Offline Shadow_7

  • Trade Count: (0)
  • Taperssection Member
  • ***
  • Posts: 310
Re: questions about .txt files...
« Reply #16 on: April 25, 2011, 09:13:29 AM »
In the FTP protocol, you can choose between ASCII and Binary transfers and the ASCII version takes care of the \r\n conversion for your platform. 

When in doubt always save it out the windows way IMO.  As most text only editors are good about ignoring/converting the inappropriate char.  But not so good at adding it like you've seen with notepad.  So \r\n if you intend to share.

 

RSS | Mobile
Page created in 0.049 seconds with 27 queries.
© 2002-2024 Taperssection.com
Powered by SMF