EmEditor (text editor) Forum Index
   Questions and Answers about EmEditor Core
     Saving a file with both CRLF and solo LF characaters
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
SSI
Posted on: 9/22/2010 5:41 am
Just popping in
Joined: 9/22/2010
From:
Posts: 2
Saving a file with both CRLF and solo LF characaters
We have a file that needs to contain both CRLF (hex 0D0A) and separate individual linefeed characters (0A).

Seems whenever we save the file either the CRLF's become LF's, or the LF's become CRLF's.

I've tried saving as Unix format, Windows format, or "No Change".

Is it possible to save both in a single file using EmEditor?
CrashNBurn
Posted on: 9/22/2010 8:30 am
Just can't stay away
Joined: 4/8/2010
From:
Posts: 130
Re: Saving a file with both CRLF and solo LF characaters
Open a Command-Prompt: EDIT
Type: ALT+10
(Similiarly, NotePad seems to generate the same Char)

A character will print on-screen, which should be 0x0A
Select/Copy that, Paste into EmEditor where you need the 0x0A

The unfortunate side-effect of that, is the File-type will need to be UTF-8 or UTF-16 -- even though the character in question is not unicode.

I looked in EmEditor's Insert-Special Character, curiously it is missing Ctrl-J, 0010 and Alt+10 is a character that neither can Notepad2, Ted Editor nor MetaPad generate ALT+10 -- though they do do most of the other ALT+codes.

It is possible that the ALT+10 generated by Notepad or "Edit" isn't actually 0x0A.

Although I've had success with codes prior to 0x0A in a regular ASCII file.
Yutaka
Posted on: 9/22/2010 8:33 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2398
Re: Saving a file with both CRLF and solo LF characaters
Hello SSI,

If you are trying to combine two files into one by copy and paste, you might need to check "Preserve (CR/LF) returns on Clipboard" before you copy and paste text from one file to another.

Or in Command Prompt, you can type

COPY /B A.txt+B.txt C.txt


If you are manually inserting a return, EmEditor will automatically adjust the return method using one at the cursor. To insert a specific return, you can select under Tools menu, All Commands > Edit > Insert > CR only, LF only, or CR+LF. On the Keyboard Map (under Help), you can assign any keyboard shortcuts as these commands.

I hope this helps.
Thank you!


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

CrashNBurn
Posted on: 9/22/2010 8:48 am
Just can't stay away
Joined: 4/8/2010
From:
Posts: 130
Re: Saving a file with both CRLF and solo LF characaters
I *just* realized the Tools / All Commands isn't just a duplicate of the regular File/Edit/... MainMenu.

EmEditor is suprising sometimes. There's still a number of features I really wish it had --- but many of these other commands I've never seen in any editor.
Threaded | Newest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文