From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#4157: 23.1.50; faulty character characterisation for =?UTF-8?Q?=C3=A4?= Date: Thu, 10 Oct 2019 02:10:10 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="162935"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Peter Dyballa , 4157@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 10 02:11:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iIM2w-000gEr-A1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Oct 2019 02:11:10 +0200 Original-Received: from localhost ([::1]:60954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIM2v-0004SC-4F for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Oct 2019 20:11:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44360) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIM2p-0004S6-7X for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 20:11:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIM2o-0002Xe-8A for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 20:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45686) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iIM2o-0002Xa-50 for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 20:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iIM2n-0000Wx-Si for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2019 20:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Oct 2019 00:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4157 X-GNU-PR-Package: emacs Original-Received: via spool by 4157-submit@debbugs.gnu.org id=B4157.15706662301992 (code B ref 4157); Thu, 10 Oct 2019 00:11:01 +0000 Original-Received: (at 4157) by debbugs.gnu.org; 10 Oct 2019 00:10:30 +0000 Original-Received: from localhost ([127.0.0.1]:54507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIM2H-0000W4-R1 for submit@debbugs.gnu.org; Wed, 09 Oct 2019 20:10:30 -0400 Original-Received: from mail-pg1-f172.google.com ([209.85.215.172]:33740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIM2G-0000Vp-2t for 4157@debbugs.gnu.org; Wed, 09 Oct 2019 20:10:28 -0400 Original-Received: by mail-pg1-f172.google.com with SMTP id i76so2485720pgc.0 for <4157@debbugs.gnu.org>; Wed, 09 Oct 2019 17:10:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=6PofsVYIIWqLrW6uBIRXCieOdepq0iXn84FjiwuN4CA=; b=cw9ZijxNmZgdsh9b+WPPSq2dw0e2gmkSDPFYumUoXncCPJxXTtZi0zNHd1oF5CK9IX jr8WDSEAq2gqr7hOtJwlzRjqhWUl6CR4sBieWuoF+5S28k5KHf+ag8RR1tCn5ebiQmHK mz3Qcjzeh13YywF0kB6q+WXywqqek6PoiRzL0DJZb0zigyvY2MQzl8xgVs75R+xRaNEa LpOM15aTLrLwK6TRPRPeqtE94tLHR2OcFaLRiMMF8sChKyAqStyIAh1i903FV+UxRX/p xHNh5gYGBYktAUEZypDhMBaMEEwNwwqKKFXTAnTCY7U107LvpIcqzandxuzygePpkZGt pnIw== X-Gm-Message-State: APjAAAX8wU4rOLlaXFMRMPt2jiSFWxpYTzWpIE6Vz3pephqlHNlmlG+S +1fuKI7u0Ta7Ch3bVx7Q1Su83hewhx8teNXR8Ts= X-Google-Smtp-Source: APXvYqz4TZfYBQuI66CmXBqZrQ5fV2hEad+FTkMXKPJo1SF+4xgctxpF2+pZPJvUcNfFctIz+YLEjaM8f2OV2LBrv7Q= X-Received: by 2002:a63:1c03:: with SMTP id c3mr6989190pgc.198.1570666222086; Wed, 09 Oct 2019 17:10:22 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:168826 Archived-At: Stefan Monnier writes: > >> So my guess was right: ls's output uses utf-8 for the filenames, but > >> latin-1 for the date, which is why it's difficult for dired to do the > >> right thing (it's not impossible, of course, but it's more work and > >> dired is currently not setup for that). > > > > Ten years later, I can verify that this is still an issue on current > > master running on macOS 10.13. I think Stefan Monnier is spot on > > above. > > I understand why utf--8 is used for the filenames, but what makes the > month be output in latin-1? macOS is supposedly an "all utf-8" > environment, AFAIK. > > I'm not sure if macOS uses locales in the POSIX way, but... can you > check what is your locale set to (and ideally, maybe, check what/who > sets it)? I've never tried changing from UTF-8 myself, and use the default English language macOS system setting. My default environment is simply: $ env | grep ^L[CA] LC_CTYPE=3DUTF-8 To see this, I was running: LC_CTYPE=3Dde_DE.ISO8859-15 LANG=3Dde_DE.ISO8859-15 ./src/emacs -Q When I replace "./src/emacs -Q" with "ls -l" in terminal, I get strange characters for files with mtime in March. (I tried this with the default Terminal.app as well as another terminal emulator called iterm2.) The month name is "M=C3=A4rz" in German but when it's in the date, the character "=C3=A4" shows up as "?". Meanwhile, any filenames with the same character displays correctly, like so: -rw-r--r-- 1 skangas staff 0 10 Okt 01:59 M=C3=A4rz drwxr-xr-x 3 skangas staff 96 10 M?r 2017 foobar I see no problems displaying "=C3=A4" when I run: LC_CTYPE=3Dde_DE.UTF-8 LANG=3Dde_DE.UTF-8 ./src/emacs -Q Perhaps you're just not supposed to use anything but UTF-8 on macOS? And this is just a configuration error? Best regards, Stefan Kangas