GNU bug report logs - #46171
27.1; buffer-file-coding-system

Previous Next

Package: emacs;

Reported by: Gordillo-Marquijano Daniel-Fabian <daniel-f.gordillo <at> inetum.world>

Date: Fri, 29 Jan 2021 12:41:02 UTC

Severity: normal

Found in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 46171 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gordillo-Marquijano Daniel-Fabian <daniel-f.gordillo <at> inetum.world>
Cc: 46171 <at> debbugs.gnu.org
Subject: Re: bug#46171: 27.1; buffer-file-coding-system
Date: Fri, 29 Jan 2021 15:58:49 +0200
> Date: Fri, 29 Jan 2021 12:14:45 +0000
> From: daniel-f.gordillo--- via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> In Emacs for Windows: I opened a SQL generated file with coding utf-8,
> but it's identified as iso-latin-1 (but it's not true). The same file,
> in Emacs for gnu/Linux, it's identified as utf-8.

It isn't always possible to identify the UTF-8 encoding, so when the
default of the locale is not UTF-8 (and it never is on MS-Windows),
Emacs sometimes guesses wrong.

To work around this, if you know the file is encoded in UTF-8, you can
tell Emacs about that:

  C-x RET c utf-8 RET C-x C-f <the-file> RET

OTOH, if SQL files are always encoded in UTF-8 (are they?), we can add
this knowledge to Emacs, assuming these files have some known
file-name extension, or have some telltale string at their beginning.




This bug report was last modified 4 years and 162 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.