Bug 111172

Summary: emacs has problem with japanese(maybe CJK) environment
Product: [Fedora] Fedora Reporter: Yoshinori KUNIGA <kuniga>
Component: emacsAssignee: Jens Petersen <petersen>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: mitr, ykuniga
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-01-18 07:09:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yoshinori KUNIGA 2003-11-28 18:05:38 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.2.1)
Gecko/20030225

Description of problem:
Emacs has problem with japanese environment owing to
incomplete configuration in lang-coding-systems-init.el

Example patch:
--- lang-coding-systems-init.el.orig    2003-10-27 22:40:42 +0900
+++ lang-coding-systems-init.el 2003-11-29 02:56:21 +0900
@@ -13,6 +13,15 @@
           ;; CJK utf-8 locale needs Mule-UCS
           (require 'un-define)
           ;; use Mule-UCS utf-8 coding-system for subprocess IO
+          (cond ((equal lang "ja")
+                 (set-language-environment "Japanese"))
+                ((equal lang "ko")
+                 (set-language-environment "Korean"))
+                ((equal lang-region "zh_CN")
+                 (set-language-environment "Chinese-GB"))
+                ((equal lang-region "zh_TW")
+                 (set-language-environment "Chinese-BIG5")))
+          (set-terminal-coding-system 'utf-8)
           (prefer-coding-system 'utf-8))
         (set-keyboard-coding-system 'utf-8))
        ((equal lang "ja")


Version-Release number of selected component (if applicable):
emacs-21.3-7

How reproducible:
Always

Steps to Reproduce:
1. open file encoded with eucJP or Shift-JIS (C-x C-f)
2.


Actual Results:  unsuitable action as Japanese

Expected Results:  suitable action as Japanese

Additional info:

Comment 1 Yoshinori KUNIGA 2003-12-05 05:18:56 UTC
Example patch(2003-11-28 13:05) has a problem.
If apply this patch, emacs can't handle UTF-8 encoding files.

The following patch includes for Korean and Chinese environment, 
but I tested only Japanese environment.

New example patch:
--- lang-coding-systems-init.el.orig    2003-10-27 22:40:42.000000000
+0900
+++ lang-coding-systems-init.el 2003-12-04 03:58:44.000000000 +0900
@@ -10,6 +10,17 @@
                  (substring lang-region 0 (min 2 (length
lang-region))))))
   (cond ((equal locale-coding-system 'utf-8)
         (when (member lang '("ja" "ko" "zh"))
+          ;; comment
+          (cond ((equal lang "ja")
+                 (set-language-environment "Japanese"))
+                ((equal lang "ko")
+                 (set-language-environment "Korean"))
+                ((equal lang-region "zh_CN")
+                 (set-language-environment "Chinese-GB"))
+                ((equal lang-region "zh_TW")
+                 (set-language-environment "Chinese-BIG5")))
+          ;; comment
+          (set-terminal-coding-system 'utf-8)
           ;; CJK utf-8 locale needs Mule-UCS
           (require 'un-define)
           ;; use Mule-UCS utf-8 coding-system for subprocess IO


Comment 2 Yoshinori KUNIGA 2003-12-26 03:39:27 UTC
"Additional Comment #1" I wrote was my misapprehension.
Probably First patch is suitable.
Please ignore "Additional Comment #1".


Comment 3 Jens Petersen 2004-01-14 02:23:21 UTC
Thanks for this.  Should be better in emacs-21.3-8.
Could you please test it, and close this if it is ok?


Comment 4 Yoshinori KUNIGA 2004-01-14 06:13:00 UTC
OK. I will test emacs-21.3-8.

Comment 5 Yoshinori KUNIGA 2004-01-16 06:43:51 UTC
I tested emacs-21.3-8.
It seems that the problem was solved.
Thank you.