Ticket #176 (new 不具合)

Opened 3 years ago

Last modified 2 years ago

Can not save some jisx0213 character with UTF-8 encoding.

Reported by: kthgc@nifty.com Assigned to:
Priority: major Milestone:
Component: Emacs Lisp Version: 3.00 (開発中)
Keywords: utf-8 jisx0213 Cc:

Description

Meadow version is 3.0 r3888 (I installed it with NetInstaller?.) Mule-ucs version is same as one in Meadow-2.10. This problem happens in Meadow-2.10 also.

When I open the file with UTF-8 encoding and try to save it, the following error message is displayed for the character U+2013 (EN-Dash?),and U+30A0. As the result of it, I can not edit the file. I looked into some elisp source under mule-ucs but I can not find any wrong point. I can not understand why it can read and display them correctly, but it can not save with same encoding. Please solve this problem. Start of error message:


These default coding systems were tried to encode text in the buffer `a.utf8':

utf-8-unix shift_jis

However, each of them encountered these problematic characters:

utf-8-unix: ‰ &#x30a0 shift_jis: ‰ &#x30a0

The first problematic character is at point in the displayed buffer, and C-u C-x = will give information about it.

Select one of the following safe coding systems, or edit the buffer:

euc-jisx0213 shift_jisx0213 shift_jisx0213 shift_jisx0213 shift_jisx0213 iso-2022-jp-3 iso-2022-jp-3 iso-2022-jp-3 iso-2022-7bit

Or specify any other coding system at the risk of losing the problematic characters.


:End

Attachments

a.utf8 (8 bytes) - added by kthgc@nifty.com on 2005年09月29日 13時02分35秒.
You can confirm the problem with this file.

Change History

2005年09月29日 13時02分35秒 changed by kthgc@nifty.com

  • attachment a.utf8 added.

You can confirm the problem with this file.

2005年11月14日 10時33分59秒 changed by kthgc@nifty.com

  • summary changed from Can not save some jisx0213 character with UTF-8 encoding. to Can not save some jisx0213 character with UTF-8 encoding..

I am the reporter of this problem. This problem was solved by the information by http://www.ysnb.net/meadow/meadow-users-jp/2005/msg00429.html

I hope this modification would be merged into standard packages.

==== Start of quotation

  • X-ml-count: 6788
  • Subject: Re: [FAQ] MULE-UCS 関連
  • From: YAGI Tatsuya <ynyaaa@xxxxxxxxx>
  • Date: Mon, 07 Nov 2005 23:56:34 +0900
  • User-agent: T-gnus/6.17.3 (based on No Gnus v0.3) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.3 Emacs/21.4 (i386-mingw-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/2.11-pre (ASAGAO)

矢木です。ミスって二通出してしまってごめんなさい。

YAGI Tatsuya <ynyaaa@xxxxxxxxx> writes:

試しに subst-jis.el 中の定義を (#x005c ?\) に書き換えてみると (encode-coding-string "\" 'utf-8) => "\301\234" #x7F 以下や #x10000 以上は考慮されていないようです。

utf-8 で jisx0213 が使えるように簡単にパッチを作ってみました。 international/utf-8.el にパッチを当てて、subst-jisx0213.el を load-path 内の ディレクトリに置いて下さい。 utf-16 はサロゲートペア?に対応済みのようです。

問題点:

・jisx0213 の文字の一部がユニコード値を持たない ・アポストロフィなどが ascii と区別できない ・JIS X0213:2004 非対応

おわり

;;; 設定 (modify-category-entry (make-char 'japanese-jisx0213-1) ?j) (modify-category-entry (make-char 'japanese-jisx0213-2) ?j) (eval-after-load "subst-jis" '(load "subst-jisx0213")) (load "utf-8") ;; patched file (load "utf-16") ;; for safe-charsets (utf-translate-cjk-set-unicode-range `((#x80 . ,(lsh -1 -1))))

Attachment: utf-8.el.diff Description: Binary data

Attachment: subst-jisx0213.el.gz Description: Binary data

===== End of quotation.

2005年11月14日 22時11分19秒 changed by miyoshi

The preceding patch should be applied to not Meadow but Emacs.

We should confirm the followings, before we report the patch to emacs-devel.

  • Is the patch correct?
  • Should the patch be applied to Emacs?

Does anyone know these are right or not?

;; It's above my head. :-)

-- 上記のパッチはMeadowではなくてEmacsに適用すべきものだと思います。

そのために、

  • 上記のパッチの修正は妥当か?
  • 上記のパッチはEmacsに取り込んでもらうべきか?

の検討して、本家に報告する必要があります。

どなたか検討してもらえませんか?

;; 私はこの関係は苦手で、さっぱりわかりません。


Add/Change #176 (Can not save some jisx0213 character with UTF-8 encoding.)




Change Properties
Action