Carriage Return - newline 
Author Message
 Carriage Return - newline

Using the file system object in JScript,
I write data to files. Instead of writing
each line, I keep adding to a variable and
write it at the end.

The newline seperator I am using is \n

what is driving me nuts is that when
I open the file in one text editor and it looks
fine, but in another it has all the data on
*** ONE *** line with square blocks where the \n
character is at.

Is there a way around this?!?!?!

Is it the font I am using? I tried several.

should I use the /r character?

what is the difference between \n & \r?

Mon, 28 Jun 2004 01:57:14 GMT  
 Carriage Return - newline


> Is there a way around this?!?!?!

"\n" translates to "line feed", and "\r" to "carriage return".
You need them both in proper order "\r\n". Some editors are
able to swallow "\n" and produce line break, while other
(like Notepad) can not, and show funny looking rectangle
instead of braking to new line.


Mon, 28 Jun 2004 02:27:25 GMT  
 [ 2 post ] 

 Relevant Pages 

1. removing newlines and returns in js - regex

2. carriage return line feed testing

3. carriage return in mailto doesn't work

4. Carriage Returns in strings

5. How to substitute carriage returns?

6. carriage returns + line feed

7. TextArea - Carriage Return

8. Carriage Return in JS String

9. Hard Carriage Return

10. How to substitute carriage returns?

11. Remove carriage return in a string

12. default action for carriage return in IE


Powered by phpBB® Forum Software