[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fixing Gnus, and string encoding question

From: Eric Abrahamsen
Subject: Re: Fixing Gnus, and string encoding question
Date: Sat, 06 Apr 2019 19:30:52 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Eric Abrahamsen <address@hidden>
>> Date: Fri, 05 Apr 2019 19:22:18 -0700
>> Cc: Emacs developers <address@hidden>
>> > (decode-coding-string
>> >  "nnml:\343\203\206\343\202\271\343\203\210" 'utf-8) ;=> "nnml:テスト"
>> >
>> > (decode-coding-string
>> >  (symbol-name (read "nnml:\343\203\206\343\202\271\343\203\210"))
>> >  'utf-8) ;=> "nnml:テスト"
>> No, unfortunately -- that would make everything much easier. Eventually
>> the idea will be to decode the strings into plain utf-8-emacs, but for
>> now I'm stuck keeping them in this weird half-state. I literally need a
>> conversion between the two versions above.
> Why do you need to keep these strings undecoded?

Andreas Schwab <address@hidden> writes:

> Why do you need to use the escaped representation?
>> The group name is read from file with `set-buffer-multibyte' nil,
> Why can't you decode the file contents first, before passing it to read?

That's the eventual plan. Gnus had the names encoded because they were
kept as symbols. I didn't want to go in one fell swoop from encoded
strings interned in obarrays to completely decoded strings kept in hash
tables, because I assumed I would screw something up and break Gnus and
annoy everyone. So that worked out well... But I should have done
encoded symbols kept in hash tables as the first intermediate step.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]