GNU bug report logs -
#5387
MS950 alias for CP950 charset
Previous Next
Reported by: jidanni <at> jidanni.org
Date: Fri, 15 Jan 2010 11:15:02 UTC
Severity: normal
Merged with 5647,
5681
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 5387 <at> debbugs.gnu.org (full text, mbox):
In article <87my0fy44r.fsf <at> jidanni.org>, jidanni <at> jidanni.org writes:
>>> And it turns out MS950 is an alias for CP950,
>>> Where did you get that information?
> I inferred it from my single encounter.
>>> I checked <http://www.iana.org/assignments/character-sets>
>>> and found that only MS936 is listed as an alias of GBK.
> That makes two... or 1.5.
And,
iconv: MS932, MS936, MSCP949, MSCP1361
python: ms932, ms936, ms949, ms950, ms1361
hmmm...
I've just installed the attached change to accept msXXX.
canonicalize-coding-system-name is used by
coding-system-from-name, and, at least, rmail uses it.
If you are using rmail, please try the latest code, or the
attached patch.
---
Kenichi Handa
handa <at> m17n.org
=== modified file 'lisp/international/mule-cmds.el'
--- lisp/international/mule-cmds.el 2010-01-13 08:35:10 +0000
+++ lisp/international/mule-cmds.el 2010-01-15 12:33:24 +0000
@@ -226,19 +226,22 @@
;; and delimiter characters. Support function of
;; coding-system-from-name.
(defun canonicalize-coding-system-name (name)
- (if (string-match "^iso[-_ ]?[0-9]" name)
- ;; "iso-8859-1" -> "8859-1", "iso-2022-jp" ->"2022-jp"
- (setq name (substring name (1- (match-end 0)))))
- (let ((idx (string-match "[-_ /]" name)))
- ;; Delete "-", "_", " ", "/" but do distinguish "16-be" and "16be".
- (while idx
- (if (and (>= idx 2)
- (eq (string-match "16-[lb]e$" name (- idx 2))
- (- idx 2)))
- (setq idx (string-match "[-_ /]" name (match-end 0)))
- (setq name (concat (substring name 0 idx) (substring name (1+ idx)))
- idx (string-match "[-_ /]" name idx))))
- name))
+ (if (string-match "^\\(ms\\|ibm\\|windows-\\)\\([0-9]+\\)$" name)
+ ;; "ms950", "ibm950", "windows-950" -> "cp950"
+ (concat "cp" (match-string 2 name))
+ (if (string-match "^iso[-_ ]?[0-9]" name)
+ ;; "iso-8859-1" -> "8859-1", "iso-2022-jp" ->"2022-jp"
+ (setq name (substring name (1- (match-end 0)))))
+ (let ((idx (string-match "[-_ /]" name)))
+ ;; Delete "-", "_", " ", "/" but do distinguish "16-be" and "16be".
+ (while idx
+ (if (and (>= idx 2)
+ (eq (string-match "16-[lb]e$" name (- idx 2))
+ (- idx 2)))
+ (setq idx (string-match "[-_ /]" name (match-end 0)))
+ (setq name (concat (substring name 0 idx) (substring name (1+ idx)))
+ idx (string-match "[-_ /]" name idx))))
+ name)))
(defun coding-system-from-name (name)
"Return a coding system whose name matches with NAME (string or symbol)."
This bug report was last modified 15 years and 68 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.