GNU bug report logs - #49808
27.1; ediff assumes user's language is English

Previous Next

Package: emacs;

Reported by: Matthieu Dubuget <matthieu.dubuget <at> gmail.com>

Date: Sun, 1 Aug 2021 15:13:02 UTC

Severity: minor

Tags: moreinfo

Found in version 27.1

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Matthieu Dubuget <matthieu.dubuget <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 49808 <at> debbugs.gnu.org
Subject: Re: bug#49808: 27.1; ediff assumes user's language is English
Date: Mon, 22 Aug 2022 14:49:28 +0200
I managed to reproduce the problem on a linux virtual machine ran from 
my new work machine.

First, some context (note that "tutu" one-line file does not have a 
carriage return):

```bash
madu <at> alienmadu:~$ cat /etc/issue
Debian GNU/Linux 11 \n \l

madu <at> alienmadu:~$ uname -a
Linux alienmadu 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 
22:23:49 UTC 2021 x86_64 GNU/Linux
madu <at> alienmadu:~$ emacs --version
GNU Emacs 27.1
Copyright (C) 2020 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
madu <at> alienmadu:~$ cat toto
auiea
madu <at> alienmadu:~$ cat tutu
eaiamadu <at> alienmadu:~$ locale
LANG=fr_FR.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
madu <at> alienmadu:~$ diff toto tutu
1c1
< auiea
---
> eaia
\ Pas de fin de ligne à la fin du fichier
madu <at> alienmadu:~$
```

Then:
- emacs -Q
- M-x ediff-files


Just to be sure, I did `dpkg-reconfigure locales` and:

```bash
madu <at> alienmadu:~$ sudo dpkg-reconfigure locales
[sudo] Mot de passe de madu :
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
madu <at> alienmadu:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=fr_FR.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
madu <at> alienmadu:~$ diff toto tutu
1c1
< auiea
---
> eaia
\ No newline at end of file
madu <at> alienmadu:~$
```

And this time, I could ediff my two files from emacs.

Best regards


Le 22/08/2022 à 12:58, Lars Ingebrigtsen a écrit :
> Matthieu Dubuget <matthieu.dubuget <at> gmail.com> writes:
>
>> When using Ediff with a non-English locale, errors returned by diff are
>> not recognized by Ediff.
>>
>> When diff outputs a localized version of "\ No newline at end of file",
>> ediff do not recognize it and fails to display the differences.
>>
>> See https://stackoverflow.com/q/9242651/3407924
>> and this post for a clear explanation of the problem:
>> https://stackoverflow.com/a/9244759/3407924
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
>
> Do you have a recipe to reproduce this problem, starting from "emacs
> -Q"?
>
> I tried starting Emacs with
>
> LANG=de_DE.UTF-8 emacs -Q
>
> and then using ediff, but I was unable to reproduce the problem





This bug report was last modified 2 years and 268 days ago.

Previous Next


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