Bug 111172 - emacs has problem with japanese(maybe CJK) environment
emacs has problem with japanese(maybe CJK) environment
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: emacs (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-28 13:05 EST by Yoshinori KUNIGA
Modified: 2007-11-30 17:10 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-18 02:09:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yoshinori KUNIGA 2003-11-28 13:05:38 EST
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 00:18:56 EST
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-25 22:39:27 EST
"Additional Comment #1" I wrote was my misapprehension.
Probably First patch is suitable.
Please ignore "Additional Comment #1".
Comment 3 Jens Petersen 2004-01-13 21:23:21 EST
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 01:13:00 EST
OK. I will test emacs-21.3-8.
Comment 5 Yoshinori KUNIGA 2004-01-16 01:43:51 EST
I tested emacs-21.3-8.
It seems that the problem was solved.
Thank you.

Note You need to log in before you can comment on or make changes to this bug.