[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 08:58:55 -0500 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) |
On Fri, 15 Aug 2008 20:04:42 +0300 Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Ted Zlatanov <tzz@lifelogs.com>
>> Date: Fri, 15 Aug 2008 10:54:20 -0500
>>
>> There should probably be a specific function for this:
>>
>> (decode-coding-string-as-unibyte "íóëü" 'cp1251)
>>
>> ditto for decode-coding-region. Should I add it or is that not
>> generally useful?
EZ> Personally, I think it's not useful, since decode-coding-region and
EZ> decode-coding-string are used only on unibyte text. But feel free to
EZ> raise this on emacs-devel.
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.
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 :)
On Fri, 15 Aug 2008 20:06:59 +0400 Dmitry Dzhus <dima@sphinx.net.ru> wrote:
DD> That was nitpicking somewhat irrelevant to unibyte-multibyte problem:
DD> Ted expected to get «нуль», and it's «íóëü», though the string he
DD> originally provided — «íîëü» — decodes to «ноль»; however, both «нуль»
DD> and «ноль» mean «zero».
Yes, I was translating from Russian and knew the text said "zero" but
didn't remember the correct spelling. Thanks for checking.
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
- 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, 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