[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: decode-coding-string question
From: |
Ted Zlatanov |
Subject: |
Re: decode-coding-string question |
Date: |
Mon, 18 Aug 2008 15:07:17 -0500 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) |
On Mon, 18 Aug 2008 22:11:37 +0300 Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Ted Zlatanov <tzz@lifelogs.com>
>> Date: Mon, 18 Aug 2008 08:58:55 -0500
>>
>> How would you recommend decoding text from particular encodings? Given
>> text like the one shown above in a buffer, only decode-coding-region
>> seems to DTRT, and it's not interactive.
EZ> If you mean interactively, i.e. you visited a buffer and then
EZ> discovered that it was decoded incorrectly, and the actual encoding is
EZ> different, then "C-x RET c cp1251 RET M-x revert-buffer RET" should do
EZ> what you want, I think.
>> Context: I have a file full of CP1251 data and don't want to use Perl's
>> Encode module because I'm stubborn and think Emacs should handle it :)
EZ> What about the rest of the file? is it encoded in some other encoding?
EZ> If not, then the above recipe should do. If it doesn't, please tell
EZ> more details.
I often have to open mangled files with mixed-up encodings; it's
convenient to set the coding-system after I look at the text, and only
apply it to a region.
On Mon, 18 Aug 2008 18:45:29 +0100 David Golden <david.golden@oceanfree.net>
wrote:
[similar advice]
I see it's an uncommon operation, so I'll use the make-unibyte-string
recipe Eli and others recommended.
Thanks
Ted
- decode-coding-string question, Ted Zlatanov, 2008/08/14
- Re: decode-coding-string question, Dmitry Dzhus, 2008/08/14
- Re: decode-coding-string question, Eli Zaretskii, 2008/08/15
- Re: decode-coding-string question, Ted Zlatanov, 2008/08/15
- Re: decode-coding-string question, Eli Zaretskii, 2008/08/15
- Message not available
- Re: decode-coding-string question, Ted Zlatanov, 2008/08/18
- Re: decode-coding-string question, David Golden, 2008/08/18
- Re: decode-coding-string question, Eli Zaretskii, 2008/08/18
- Re: decode-coding-string question, Kevin Rodgers, 2008/08/19
- Message not available
- Re: decode-coding-string question,
Ted Zlatanov <=
- Re: decode-coding-string question, David Golden, 2008/08/18
- Re: decode-coding-string question, Ted Zlatanov, 2008/08/19
- Re: decode-coding-string question, Nikolaj Schumacher, 2008/08/19
Message not available
Re: decode-coding-string question, David Golden, 2008/08/14