[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strip extraneous CR characters
From: |
Eli Zaretskii |
Subject: |
Re: strip extraneous CR characters |
Date: |
Mon, 28 Sep 2009 20:10:33 +0200 |
> From: Ted Zlatanov <address@hidden>
> Date: Mon, 28 Sep 2009 12:49:21 -0500
>
> Where can I find an example of this EOL decoding from DOS, to ensure I
> am doing it correctly?
It's very simple:
(let ((coding-system-for-read 'undecided-dos))
(insert-file-contents ....))
or:
(let ((coding-system-for-read 'undecided-dos))
(decode-coding-inserted-region ....))
or:
(decode-coding-region start end 'undecided-dos ...)
or (if you must use a string, which I personally advise against):
(decode-coding-string STRING 'undecided-dos ...)
If none of the above fits the bill, please tell more about what you
need to accomplish, where is the text with CRs held originally and
where do you want to have the text with CRs stripped.