GNU bug report logs - #8517
Can't handle utf8 encoded filenames in locale 'de_DE.utf8'

Previous Next

Package: emacs;

Reported by: Rob Browning <rlb <at> defaultvalue.org>

Date: Mon, 18 Apr 2011 00:04:01 UTC

Severity: normal

Tags: notabug

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8517 in the body.
You can then email your comments to 8517 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8517; Package emacs. (Mon, 18 Apr 2011 00:04:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rob Browning <rlb <at> defaultvalue.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 18 Apr 2011 00:04:02 GMT) Full text and rfc822 format available.

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

From: Rob Browning <rlb <at> defaultvalue.org>
To: bug-gnu-emacs <at> gnu.org
Cc: 611396-forwarded <at> bugs.debian.org, Gernot Kieseritzky <gernotk <at> gmail.com>
Subject: Re: Can't handle utf8 encoded filenames in locale 'de_DE.utf8'
Date: Sun, 17 Apr 2011 19:02:58 -0500
(If possible, please preserve the 611396-forwarded address in any replies.)

Gernot Kieseritzky writes:

> Opening an existing file named "ÖÄÜß.txt" does not work, instead,
> Emacs creates a new buffer with the same name (reported correctly)
> which is empty.  After saving the file name is corrupted displaying as
> "???.txt" on the console.  Nautilus reports a "wrong encoding" and
> equally display three question marks instead of the "Umlauts".  In
> contrast, in Ubuntu 10.04 utf8 encoded file names create no problems
> for Emacs.

It turns out that the problem was being caused by this call from .emacs:

  (current-language-environment "German")

which appears to make Emacs prefer latin-1.

I wasn't sure if this should be considered an actual problem, or just a
configuration error, so I thought I should forward it.

Please see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=611396 for
further details.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8517; Package emacs. (Wed, 21 Aug 2019 20:58:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: 8517 <at> debbugs.gnu.org, 611396-forwarded <at> bugs.debian.org,
 Gernot Kieseritzky <gernotk <at> gmail.com>
Subject: Re: bug#8517: Can't handle utf8 encoded filenames in locale
 'de_DE.utf8'
Date: Wed, 21 Aug 2019 13:56:32 -0700
Rob Browning <rlb <at> defaultvalue.org> writes:

> It turns out that the problem was being caused by this call from .emacs:
>
>   (current-language-environment "German")
>
> which appears to make Emacs prefer latin-1.
>
> I wasn't sure if this should be considered an actual problem, or just a
> configuration error, so I thought I should forward it.

I think this is working as it's supposed t.  The "German" environment is
apparently defined as follows:

 ("German"
  (documentation . "This language environment is almost the same as Latin-1,\nbut sets the default input method to \"german-postfix\".\nAdditionally, it selects the German tutorial.")
  (sample-text . "German (Deutsch Nord)	Guten Tag\nGerman (Deutsch Süd)	Grüß Gott")
  (unibyte-display . iso-latin-1)
  (input-method . "german-postfix")
  (nonascii-translation . iso-8859-1)
  (coding-priority iso-latin-1)
  (coding-system iso-latin-1 iso-latin-9)
  (charset iso-8859-1)
  (tutorial . "TUTORIAL.de"))

So while it may be surprising in this day and age that that's what this
does, I don't think the definition can be changed (because that'd break
the setup of people who rely on "German" to be iso-8859-1).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) notabug. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 21 Aug 2019 20:58:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 8517 <at> debbugs.gnu.org and Rob Browning <rlb <at> defaultvalue.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 21 Aug 2019 20:58:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8517; Package emacs. (Thu, 22 Aug 2019 14:10:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 8517 <at> debbugs.gnu.org, 611396-forwarded <at> bugs.debian.org, gernotk <at> gmail.com,
 rlb <at> defaultvalue.org
Subject: Re: bug#8517: Can't handle utf8 encoded filenames in locale
 'de_DE.utf8'
Date: Thu, 22 Aug 2019 17:09:46 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Wed, 21 Aug 2019 13:56:32 -0700
> Cc: 8517 <at> debbugs.gnu.org, 611396-forwarded <at> bugs.debian.org,
>  Gernot Kieseritzky <gernotk <at> gmail.com>
> 
>  ("German"
>   (documentation . "This language environment is almost the same as Latin-1,\nbut sets the default input method to \"german-postfix\".\nAdditionally, it selects the German tutorial.")
>   (sample-text . "German (Deutsch Nord)	Guten Tag\nGerman (Deutsch Süd)	Grüß Gott")
>   (unibyte-display . iso-latin-1)
>   (input-method . "german-postfix")
>   (nonascii-translation . iso-8859-1)
>   (coding-priority iso-latin-1)
>   (coding-system iso-latin-1 iso-latin-9)
>   (charset iso-8859-1)
>   (tutorial . "TUTORIAL.de"))
> 
> So while it may be surprising in this day and age that that's what this
> does, I don't think the definition can be changed (because that'd break
> the setup of people who rely on "German" to be iso-8859-1).

Not sure why this is even important.  By default, Emacs takes the
codeset part (i.e. the encoding it prefers) from the locale.  the
above is only important if someone sets the language environment by
hand.  Am I right?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8517; Package emacs. (Fri, 23 Aug 2019 00:17:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 8517 <at> debbugs.gnu.org, 611396-forwarded <at> bugs.debian.org,
 rlb <at> defaultvalue.org, gernotk <at> gmail.com
Subject: Re: bug#8517: Can't handle utf8 encoded filenames in locale
 'de_DE.utf8'
Date: Fri, 23 Aug 2019 02:16:34 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Not sure why this is even important.  By default, Emacs takes the
> codeset part (i.e. the encoding it prefers) from the locale.  the
> above is only important if someone sets the language environment by
> hand.  Am I right?

You are.

The user had

(current-language-environment "German")

in ~/.emacs, and was surprised that this overrode the LANG settings.
But like I tried to say, that's what that invocation does, so this works
as designed.  (And the user should remove that setting.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8517; Package emacs. (Fri, 23 Aug 2019 08:03:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 8517 <at> debbugs.gnu.org, 611396-forwarded <at> bugs.debian.org,
 rlb <at> defaultvalue.org, gernotk <at> gmail.com
Subject: Re: bug#8517: Can't handle utf8 encoded filenames in locale
 'de_DE.utf8'
Date: Fri, 23 Aug 2019 11:02:51 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 8517 <at> debbugs.gnu.org,  611396-forwarded <at> bugs.debian.org,
>   gernotk <at> gmail.com,  rlb <at> defaultvalue.org
> Date: Fri, 23 Aug 2019 02:16:34 +0200
> 
> The user had
> 
> (current-language-environment "German")
> 
> in ~/.emacs, and was surprised that this overrode the LANG settings.
> But like I tried to say, that's what that invocation does, so this works
> as designed.  (And the user should remove that setting.)

The user should either remove that setting or follow it by

  (prefer-coding-system 'WHATEVER)

if the default preferences are not to their liking.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 Sep 2019 11:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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