From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Timo_Myyr=C3=A4?= Newsgroups: gmane.emacs.devel Subject: [patch] add support for ibm278 Date: Thu, 24 Dec 2020 17:39:25 +0200 Message-ID: <878s9nb4cy.fsf@asteroid.bittivirhe.fi> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14509"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (berkeley-unix) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 24 16:40:16 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ksSiu-0003hf-Ie for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Dec 2020 16:40:16 +0100 Original-Received: from localhost ([::1]:42632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksSit-0000bs-LK for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Dec 2020 10:40:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksSiE-0008Ch-76 for emacs-devel@gnu.org; Thu, 24 Dec 2020 10:39:34 -0500 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:36235) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksSiC-0002zn-5D for emacs-devel@gnu.org; Thu, 24 Dec 2020 10:39:33 -0500 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 37A7F5E2 for ; Thu, 24 Dec 2020 10:39:28 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 24 Dec 2020 10:39:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bittivirhe.fi; h=from:to:subject:date:message-id:mime-version:content-type; s= fm1; bh=JjMSJZXblm86wxvvQcx8O/fWstchwSNydUOPxSdP/IE=; b=WbN1k/HD 8Cvtm9Ee5P/zR64o/BUNxOvrH4iMW1d/oVck/4eVZGaqztBQSrbDHZCvTQJnBvb0 nwTy974bsBG22Yi0q+ZxC6O6J8/282kI0NEfrwGXlKSYQbu596kk0t2FLFv5TNGz 0iiB/cYLJG2ung2Zbhfm/8OvQh9rzmDQUNtVM8a1slKGpHocClM3q7fScnhzMfnV YU/tdKDjtQXbWHG55ibyWFoeJH0MlZ9hor2QWKnG8vN5js8bp+VRafyE4VHY1+hY xSsO5oUittn5AwNexvtr1XJFFYVYeXccZ116rp4Ce9q0ovlhLAKGm++U567f1D/Q ZYmzwV+L669Kfg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=JjMSJZXblm86wxvvQcx8O/fWstchw SNydUOPxSdP/IE=; b=BJ7UTFeiWDIqaZ6ZcmQwod2oyL0/EsW3J3UKYzyPTNCVW SAcoUr2SWB508wMm2th5umJ9jcPXFRJoZcPrtFq8YtfQpoZB/2hUkYbD4d6eDEp6 vV0gUkUqhPO/njxcxggk8RmUsxXHo/m3XThqj83SjGEPs2IetWxJTgqNlulMIATU Ea62ZrPkNza+79OZ3VkGoRQmEijd+c9wd8urm+y7Ar+3RNEnXeYFQnIL44J8CvVJ wyjyAFE4eXJyXhFAJEegQRSIzHF2vCCqcLWRo/XVcZZZtVo+jlJ7LlTM6jl29L5M HGWgSOHUQGu7DmNhfMAdhXMqJJbvZjzHW2Tr5Jwaw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtledgkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkfgggtgesthdtredttd erjeenucfhrhhomhepvfhimhhopgfohiihrhomuceothhimhhordhmhiihrhgrsegsihht thhivhhirhhhvgdrfhhiqeenucggtffrrghtthgvrhhnpeegkedvtdefjefhveejudevge eggeekgfdtudehteffleeftdegjeffvdekhfekkeenucfkphepledurdduhedvrdejhedr udekkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe htihhmohdrmhihhihrrgessghithhtihhvihhrhhgvrdhfih X-ME-Proxy: Original-Received: from asteroid.bittivirhe.fi.bittivirhe.fi (91-152-75-188.elisa-laajakaista.fi [91.152.75.188]) by mail.messagingengine.com (Postfix) with ESMTPA id 4B23724005B for ; Thu, 24 Dec 2020 10:39:27 -0500 (EST) Received-SPF: pass client-ip=64.147.123.20; envelope-from=timo.myyra@bittivirhe.fi; helo=wout4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:261684 Archived-At: Hi, In recent history I had to check file from our customer which was showing gibberish. It seems emacs is missing few defines in order to use ibm278 encoding. There already seems to be charset map for ibm278 in etc/charsets so emacs is only missing few defines in order to use ibm278 encoding: add support for ebcdic code page ibm278 for finnish/swedish there was already charset file present in etc/charsets but it wasn't hooked to mule. This defines charset and coding system to use ibm278 with emacs. 2 files changed, 13 insertions(+) lisp/international/mule-conf.el | 7 +++++++ lisp/language/european.el | 6 ++++++ modified lisp/international/mule-conf.el @@ -1075,6 +1075,13 @@ 'ibm038 (define-charset-alias 'ebcdic-int 'ibm038) (define-charset-alias 'cp038 'ibm038) +(define-charset 'ibm278 + "Finnish/swedish version of EBCDIC" + :short-name "IBM038" + :code-space [0 255] + :mime-charset 'ibm278 + :map "IBM278") + (define-charset 'ibm1047 ;; Says groff: "IBM1047, `EBCDIC Latin 1/Open Systems' used by OS/390 Unix." modified lisp/language/european.el @@ -324,6 +324,12 @@ 'windows-1257 :mime-charset 'windows-1257) (define-coding-system-alias 'cp1257 'windows-1257) +(define-coding-system 'ibm278 + "Finnish/Swedish version of EBCDIC" + :coding-type 'charset + :charset-list '(ibm278) + :mnemonic ?*) + (define-coding-system 'cp775 "DOS codepage 775 (PC Baltic, MS-DOS Baltic Rim)" :coding-type 'charset