[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] add support for ibm278
From: |
Timo Myyrä |
Subject: |
Re: [patch] add support for ibm278 |
Date: |
Fri, 25 Dec 2020 13:21:54 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (berkeley-unix) |
Eli Zaretskii <eliz@gnu.org> [2020-12-24, 20:56 +0200]:
>> From: Timo Myyrä <timo.myyra@bittivirhe.fi>
>> Date: Thu, 24 Dec 2020 17:39:25 +0200
>>
>> add support for ebcdic code page ibm278 for finnish/swedish
>
> Thanks. I think this needs a couple of aliases, like cp278,
> ebcdic-se-fi, etc.
>
> Also, if we are going to add this variant of EBCDIC, might as well add
> the other IBM2xx codepages as well (with the respective aliases).
Ok, I'm not sure about other ebcdic code pages but heres them added as
well.
I based my naming from IBM support docs and libintl-perl CPAN library:
https://www.ibm.com/support/knowledgecenter/en/SS3JRN_7.2.1/com.ibm.itcama.doc_7.2.1/oracleextended/fac_oracle_codepage.html
https://metacpan.org/release/libintl-perl
I'm don't have a clue whats in ebcdic-jp-e or how ebcdic-cp-gb is
different from ebcdic-uk. How does this look?
Timo
From cbcadd62b967238266bb4d38a00a605e9401751b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Myyr=C3=A4?= <timo.myyra@bittivirhe.fi>
Date: Thu, 24 Dec 2020 17:29:49 +0200
Subject: [PATCH] add support for EBCDIC code pages IBM2XX
there was already charset file present in etc/charsets for IBM2XX
character sets but there wasn't definitions for them in the
elisp. Add character set and coding system definitions these.
---
lisp/international/mule-conf.el | 109 ++++++++++++++++++++++++++++++++
lisp/language/english.el | 8 +++
lisp/language/european.el | 73 +++++++++++++++++++++
lisp/language/japanese.el | 16 +++++
4 files changed, 206 insertions(+)
diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el
index 99449ad359..dd6d0326d7 100644
--- a/lisp/international/mule-conf.el
+++ b/lisp/international/mule-conf.el
@@ -1075,6 +1075,115 @@ 'ibm038
(define-charset-alias 'ebcdic-int 'ibm038)
(define-charset-alias 'cp038 'ibm038)
+(define-charset 'ibm256
+ "Netherlands version of EBCDIC"
+ :short-name "IBM256"
+ :code-space [0 255]
+ :mime-charset 'ibm256
+ :map "IBM256")
+(define-charset-alias 'ebcdic-int1 'ibm256)
+(define-charset-alias 'cp256 'ibm256)
+
+(define-charset 'ibm273
+ "Austrian / German version of EBCDIC"
+ :short-name "IBM273"
+ :code-space [0 255]
+ :mime-charset 'ibm273
+ :map "IBM273")
+(define-charset-alias 'cp273 'ibm273)
+
+(define-charset 'ibm274
+ "Belgian version of EBCDIC"
+ :short-name "IBM274"
+ :code-space [0 255]
+ :mime-charset 'ibm274
+ :map "IBM274")
+(define-charset-alias 'ebcdic-be 'ibm274)
+(define-charset-alias 'cp274 'ibm274)
+
+(define-charset 'ibm275
+ "Brazilian version of EBCDIC"
+ :short-name "IBM275"
+ :code-space [0 255]
+ :mime-charset 'ibm275
+ :map "IBM275")
+(define-charset-alias 'ebcdic-br 'ibm275)
+(define-charset-alias 'cp275 'ibm275)
+
+(define-charset 'ibm277
+ "Danish / Norwegian version of EBCDIC"
+ :short-name "IBM277"
+ :code-space [0 255]
+ :mime-charset 'ibm277
+ :map "IBM277")
+(define-charset-alias 'ebcdic-cp-dk 'ibm277)
+(define-charset-alias 'ebcdic-cp-no 'ibm277)
+(define-charset-alias 'cp277 'ibm277)
+
+(define-charset 'ibm278
+ "Finnish / Swedish version of EBCDIC"
+ :short-name "IBM278"
+ :code-space [0 255]
+ :mime-charset 'ibm278
+ :map "IBM278")
+(define-charset-alias 'ebcdic-cp-fi 'ibm278)
+(define-charset-alias 'ebcdic-cp-se 'ibm278)
+(define-charset-alias 'cp278 'ibm278)
+
+(define-charset 'ibm280
+ "Italian version of EBCDIC"
+ :short-name "IBM280"
+ :code-space [0 255]
+ :mime-charset 'ibm270
+ :map "IBM280")
+(define-charset-alias 'ebcdic-cp-it 'ibm280)
+(define-charset-alias 'cp280 'ibm280)
+
+(define-charset 'ibm281
+ "Japanese-E version of EBCDIC"
+ :short-name "IBM281"
+ :code-space [0 255]
+ :mime-charset 'ibm281
+ :map "IBM281")
+(define-charset-alias 'ebcdic-jp-e 'ibm281)
+(define-charset-alias 'cp281 'ibm281)
+
+(define-charset 'ibm284
+ "Spanish version of EBCDIC"
+ :short-name "IBM284"
+ :code-space [0 255]
+ :mime-charset 'ibm284
+ :map "IBM284")
+(define-charset-alias 'ebcdic-cp-es 'ibm284)
+(define-charset-alias 'cp284 'ibm284)
+
+(define-charset 'ibm285
+ "UK english version of EBCDIC"
+ :short-name "IBM285"
+ :code-space [0 255]
+ :mime-charset 'ibm285
+ :map "IBM285")
+(define-charset-alias 'ebcdic-cp-gb 'ibm285) ;; how this differs from
ebcdic-uk?
+(define-charset-alias 'cp285 'ibm285)
+
+(define-charset 'ibm290
+ "Japanese katakana version of EBCDIC"
+ :short-name "IBM290"
+ :code-space [0 255]
+ :mime-charset 'ibm290
+ :map "IBM290")
+(define-charset-alias 'ebcdic-jp-kana 'ibm290)
+(define-charset-alias 'cp290 'ibm290)
+
+(define-charset 'ibm297
+ "French version of EBCDIC"
+ :short-name "IBM297"
+ :code-space [0 255]
+ :mime-charset 'ibm297
+ :map "IBM297")
+(define-charset-alias 'ebcdic-cp-fr 'ibm297)
+(define-charset-alias 'cp297 'ibm297)
+
(define-charset 'ibm1047
;; Says groff:
"IBM1047, `EBCDIC Latin 1/Open Systems' used by OS/390 Unix."
diff --git a/lisp/language/english.el b/lisp/language/english.el
index b7af84c8f7..d5254effa9 100644
--- a/lisp/language/english.el
+++ b/lisp/language/english.el
@@ -70,6 +70,14 @@ 'ibm038
(define-coding-system-alias 'ebcdic-int 'ibm038)
(define-coding-system-alias 'cp038 'ibm038)
+(define-coding-system 'ibm275
+ "Brazilian version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ibm275)
+ :mnemonic ?*)
+(define-coding-system-alias 'ebcdic-br 'ibm275)
+(define-coding-system-alias 'cp275 'ibm275)
+
;; Make "ASCII" an alias of "English" language environment.
(set-language-info-alist
"ASCII" (cdr (assoc "English" language-info-alist)))
diff --git a/lisp/language/european.el b/lisp/language/european.el
index 713a0fdb34..99f062215f 100644
--- a/lisp/language/european.el
+++ b/lisp/language/european.el
@@ -324,6 +324,79 @@ 'windows-1257
:mime-charset 'windows-1257)
(define-coding-system-alias 'cp1257 'windows-1257)
+(define-coding-system 'ibm256
+ "Netherlands version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ibm256)
+ :mnemonic ?*)
+(define-coding-system-alias 'ebcdic-int1 'ibm256)
+(define-coding-system-alias 'cp256 'ibm256)
+
+(define-coding-system 'ibm273
+ "Austrian / German version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ibm273)
+ :mnemonic ?*)
+(define-coding-system-alias 'cp273 'ibm273)
+
+(define-coding-system 'ibm274
+ "Belgian version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ibm274)
+ :mnemonic ?*)
+(define-coding-system-alias 'ebcdic-be 'ibm274)
+(define-coding-system-alias 'cp274 'ibm274)
+
+(define-coding-system 'ibm277
+ "Danish / Norwegian version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ibm277)
+ :mnemonic ?*)
+(define-coding-system-alias 'ebcdic-cp-dk 'ibm277)
+(define-coding-system-alias 'ebcdic-cp-no 'ibm277)
+(define-coding-system-alias 'cp277 'ibm277)
+
+(define-coding-system 'ibm278
+ "Finnish / Swedish version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ibm278)
+ :mnemonic ?*)
+(define-coding-system-alias 'ebcdic-cp-fi 'ibm278)
+(define-coding-system-alias 'ebcdic-cp-se 'ibm278)
+(define-coding-system-alias 'cp278 'ibm278)
+
+(define-coding-system 'ibm280
+ "Italian version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ibm280)
+ :mnemonic ?*)
+(define-coding-system-alias 'ebcdic-cp-it 'ibm280)
+(define-coding-system-alias 'cp280 'ibm280)
+
+(define-coding-system 'ibm284
+ "Spanish version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ibm284)
+ :mnemonic ?*)
+(define-coding-system-alias 'ebcdic-cp-es 'ibm284)
+(define-coding-system-alias 'cp284 'ibm284)
+
+(define-coding-system 'ibm285
+ "UK english version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ibm285)
+ :mnemonic ?*)
+(define-coding-system-alias 'ebcdic-cp-gb 'ibm285)
+(define-coding-system-alias 'cp285 'ibm285)
+
+(define-coding-system 'ibm297
+ "French version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ibm297)
+ :mnemonic ?*)
+(define-coding-system-alias 'ebcdic-cp-fr 'ibm297)
+(define-coding-system-alias 'cp297 'ibm297)
+
(define-coding-system 'cp775
"DOS codepage 775 (PC Baltic, MS-DOS Baltic Rim)"
:coding-type 'charset
diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el
index 9a99245dfd..a517b4ea8e 100644
--- a/lisp/language/japanese.el
+++ b/lisp/language/japanese.el
@@ -188,6 +188,22 @@ 'japanese-shift-jis-2004
(define-coding-system-alias 'shift_jis-2004 'japanese-shift-jis-2004)
+(define-coding-system 'ibm281
+ "Japanese-E version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ibm281)
+ :mnemonic ?*)
+(define-coding-system-alias 'ebcdic-jp-e 'ibm281)
+(define-coding-system-alias 'cp281 'ibm281)
+
+(define-coding-system 'ibm290
+ "Japanese katakana version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ibm290)
+ :mnemonic ?*)
+(define-coding-system-alias 'ebcdic-jp-kana 'ibm290)
+(define-coding-system-alias 'cp290 'ibm290)
+
(set-language-info-alist
"Japanese" '((setup-function . setup-japanese-environment-internal)
(exit-function . use-default-char-width-table)
--
2.29.2