GNU bug report logs - #28705
25.3; [PATCH] Change prefered coding system for Japanese language environment

Previous Next

Package: emacs;

Reported by: Yasuhiro KIMURA <yasu <at> utahime.org>

Date: Wed, 4 Oct 2017 16:26:02 UTC

Severity: wishlist

Tags: patch

Found in version 25.3

Fixed in version 27.1

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Forwarded to http://lists.gnu.org/r/emacs-devel/2017-10/msg00226.html

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28705 in the body.
You can then email your comments to 28705 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 bug-gnu-emacs <at> gnu.org:
bug#28705; Package emacs. (Wed, 04 Oct 2017 16:26:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Yasuhiro KIMURA <yasu <at> utahime.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 04 Oct 2017 16:26:03 GMT) Full text and rfc822 format available.

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

From: Yasuhiro KIMURA <yasu <at> utahime.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.3; [PATCH] Change prefered coding system for Japanese
 language environment
Date: Wed, 04 Oct 2017 20:02:54 +0900 (JST)
[Message part 1 (text/plain, inline)]
In current implementation, 'japanese-iso-8bit' is used as prefered
coding system when you select 'Japanese' as language environment on
Unix system. But nowaday a lot of Japanese Unix users adopt
'ja_JP.UTF-8' as locale setting. So I propose to change prefered
coding system from 'japanese-iso-8bit' to 'utf-8'. And while I'm on
it, comment is fixed to fit current implementation.
[0001-Change-prefered-coding-system-for-Japanese-language-.patch (text/x-patch, inline)]
From 2c80312989659375f82d7eefd333e5ac77663f4b Mon Sep 17 00:00:00 2001
From: Yasuhiro KIMURA <yasu <at> utahime.org>
Date: Wed, 4 Oct 2017 19:09:21 +0900
Subject: [PATCH] Change prefered coding system for Japanese language
 environment.

* lisp/language/japan-util.el (setup-japanese-environment-internal):
  Use utf-8 as prefered coding system instead of japanese-iso-8bit
  when system is not windows. And while I'm at it, fix comment to fit
  current implementation.
---
 lisp/language/japan-util.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el
index 988b925409..fb4b408cd3 100644
--- a/lisp/language/japan-util.el
+++ b/lisp/language/japan-util.el
@@ -29,11 +29,11 @@
 
 ;;;###autoload
 (defun setup-japanese-environment-internal ()
-  ;; By default, we use 'japanese-iso-8bit for file names.  But, the
+  ;; By default, we use 'iso-2022-jp for default coding system.  But, the
   ;; following prefer-coding-system will override it.
   (if (memq system-type '(windows-nt ms-dos cygwin))
       (prefer-coding-system 'japanese-shift-jis)
-    (prefer-coding-system 'japanese-iso-8bit))
+    (prefer-coding-system 'utf-8))
   (use-cjk-char-width-table 'ja_JP))
 
 (defconst japanese-kana-table
-- 
2.14.2


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28705; Package emacs. (Fri, 06 Oct 2017 21:11:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Yasuhiro KIMURA <yasu <at> utahime.org>
Cc: 28705 <at> debbugs.gnu.org
Subject: Re: 25.3; [PATCH] Change prefered coding system for Japanese language
 environment
Date: Fri, 6 Oct 2017 14:10:29 -0700
[Message part 1 (text/plain, inline)]
Thanks for the bug report. Would you please discuss the practical 
advantages of the proposed patch?

Is the patch is for Japanese users who do not specify a locale via 
environment variables like LC_ALL? If so, how do they specify their 
preference to Emacs now, and how would this change affect behavior for 
them? And how do users specify their coding preference to other 
programs, such as "cat" and "diff"?

I have the impression that Emacs users in Japan are gradually switching 
from EUC-JP to UTF-8. Is there some way to verify this? I know of 
website surveys like 
<https://w3techs.com/technologies/history_overview/character_encoding/ms/y>, 
which says that since 2010 UTF-8 has grown from 51% to 90% of websites 
whereas EUC-JP has shrunk from 0.7% to 0.3% worldwide. However, this 
issue is more about what encodings are used by keyboards and terminal 
displays in Japan (typically these are programs in windowing systems 
these days, as GNU/Linux consoles cannot handle enough characters to 
support Japanese). Is there some way to estimate this?

A minor point: a change like this should be noted in the NEWS file, and 
the commit message should use the usual Emacs style. I'm attaching a 
copy of your patch with a revised commit message, along with another 
patch to mention this change in NEWS and to change affected 
documentation. I will ask for comment about this proposed change on the 
emacs-devel mailing list.

[0001-Change-preferred-Japanese-coding-system-to-UTF-8.patch (text/x-patch, attachment)]
[0002-Mention-Japanese-change-in-documentation.patch (text/x-patch, attachment)]

Added tag(s) moreinfo. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Wed, 11 Oct 2017 18:23:02 GMT) Full text and rfc822 format available.

Set bug forwarded-to-address to 'http://lists.gnu.org/r/emacs-devel/2017-10/msg00226.html'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 09 Jan 2019 00:27:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28705; Package emacs. (Wed, 09 Jan 2019 00:30:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Yasuhiro KIMURA <yasu <at> utahime.org>, 28705 <at> debbugs.gnu.org
Subject: Re: bug#28705: 25.3;
 [PATCH] Change prefered coding system for Japanese language
 environment
Date: Tue, 08 Jan 2019 19:28:40 -0500
Paul Eggert wrote:

> I will ask for comment about this proposed change on the emacs-devel
> mailing list.

AFAICS nobody commented.

To my uninformed eye, this looks like it might be somewhat related to
issues discussed in https://debbugs.gnu.org/33796 , so I wonder if it
might be time to revisit this? (I have nothing to contribute.)




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Thu, 10 Jan 2019 00:21:03 GMT) Full text and rfc822 format available.

Notification sent to Yasuhiro KIMURA <yasu <at> utahime.org>:
bug acknowledged by developer. (Thu, 10 Jan 2019 00:21:03 GMT) Full text and rfc822 format available.

Message #20 received at 28705-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Yasuhiro KIMURA <yasu <at> utahime.org>
Cc: 28705-done <at> debbugs.gnu.org, Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#28705: 25.3; [PATCH] Change prefered coding system for
 Japanese language environment
Date: Wed, 9 Jan 2019 16:20:31 -0800
Since nobody commented on it and we have a bug report about this, I 
installed the patch into the master branch and am closing the bug 
report. Thanks again for reporting it, and sorry about the delay.




bug Marked as fixed in versions 27.1. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 10 Jan 2019 00:41:01 GMT) Full text and rfc822 format available.

Removed tag(s) moreinfo. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 10 Jan 2019 00:42:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 07 Feb 2019 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 139 days ago.

Previous Next


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