Subject: Re: bug#25365: 25.1; Coding system for bookmarks and desktop

From: Eli Zaretskii <[email-masked]>
Date: Mon, 09 Jan 2017 20:49:35 +0200

> From: Dmitri Paduchikh <[email-masked]>
> Cc: [email-masked]
> Date: Mon, 09 Jan 2017 22:07:49 +0500
> 
> It may be hard to know what is happening if it is designed to happen
> automatically. So, if you insist on supporting user choice here, please
> consider the following patch. It adds the check of workability of the chosen
> codec unless it is given directly by user in which case the usual procedure
> applies, or the codec is omnipotent. In the case of encodability problems it
> will fallback to utf-8-emacs.

With the proposed patch, the fallback utf-8-emacs will happen
silently, so the user will have no idea that her selected encoding was
ignored, isn't it so?  If so, I don't think it's a good idea to do
that, when the user explicitly asks for a particular encoding.

Come to think of that, I actually don't understand why anything is
needed in addition to the current code: if the user-chosen encoding
cannot safely encode the bookmark file, Emacs will refuse to save the
file, and will insist on the user providing a safe encoding.  E.g.,
set a bookmark in TUTORIAL.ru, and then try saving the bookmark file
using the Latin-1 encoding.  I just tried something like that, and the
effect was exactly as I expected: Emacs requested me to provide
another encoding.

Thanks.