From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ulrich =?UTF-8?Q?M=C3=BCller?= Newsgroups: gmane.emacs.bugs Subject: bug#64928: 29.1; format-decode-buffer fails for de646 and duden Date: Sat, 29 Jul 2023 12:52:40 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20105"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 64928@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 29 13:47:26 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qPiPu-0004zo-9M for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 Jul 2023 13:47:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qPhaI-0003fF-Ay; Sat, 29 Jul 2023 06:54:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPhaF-0003f6-9T for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2023 06:54:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qPhaE-0007bW-EH for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2023 06:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qPhaE-0006qY-AJ for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2023 06:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ulrich =?UTF-8?Q?M=C3=BCller?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jul 2023 10:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64928 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.169062798326202 (code B ref -1); Sat, 29 Jul 2023 10:54:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Jul 2023 10:53:03 +0000 Original-Received: from localhost ([127.0.0.1]:46500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPhZH-0006oY-5r for submit@debbugs.gnu.org; Sat, 29 Jul 2023 06:53:03 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:43862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qPhZE-0006nv-6q for submit@debbugs.gnu.org; Sat, 29 Jul 2023 06:53:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qPhZ8-0003Wn-W5 for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2023 06:52:55 -0400 Original-Received: from woodpecker.gentoo.org ([140.211.166.183] helo=smtp.gentoo.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1qPhZ7-0007Nd-5N for bug-gnu-emacs@gnu.org; Sat, 29 Jul 2023 06:52:54 -0400 Received-SPF: pass client-ip=140.211.166.183; envelope-from=ulm@gentoo.org; helo=smtp.gentoo.org X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266330 Archived-At: The following command results in an error: M-x format-decode-buffer RET de646 RET Format decoding failed recode: Request `iso646-ge:latin1' is erroneous The "duden" encoding does not work either: M-x format-decode-buffer RET duden RET Format decoding failed /bin/bash: line 1: diac: command not found A trivial patch is included below. (Not sure if fixing this is even worth the effort. AFAICS Recode never recognised a charset "iso646-ge". The ISO 646 variants were added in 1993 with recode-3.3, and its label for the German variant was "iso646de" even back then. So nobody has reported this since almost 30 years.) ----- 8< ----- 8< ----- 8< ----- 8< ----- 8< ----- 8< ----- 8< ----- >From d5a7b6c0fdc93e3ad74d9798729b3036e30f0b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Sat, 29 Jul 2023 11:37:45 +0200 Subject: [PATCH] ; Fix conversions in format.el * lisp/format.el (format-alist): Fix duden and de646 conversions. --- lisp/format.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/format.el b/lisp/format.el index b2dba16659b..20c25b0b937 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -87,11 +87,16 @@ format-alist rot13-region rot13-region t nil) (duden ,(purecopy "Duden Ersatzdarstellung") nil - ,(purecopy "diac") iso-iso2duden t nil) + ;; FROM-FN used to call the "diac" command which is not widely + ;; available and apparently not under a free software license: + ;; https://tug.ctan.org/support/umlaut_tex.txt + ;; Reliable round-trip conversion is not possible anyway + ;; and would be by heuristic method, so use nil for now. + nil iso-iso2duden t nil) (de646 ,(purecopy "German ASCII (ISO 646)") nil - ,(purecopy "recode -f iso646-ge:latin1") - ,(purecopy "recode -f latin1:iso646-ge") t nil) + ,(purecopy "iconv -f iso646-de -t utf-8") + ,(purecopy "iconv -f utf-8 -t iso646-de") t nil) (denet ,(purecopy "net German") nil iso-german iso-cvt-read-only t nil) -- 2.41.0 ----- >8 ----- >8 ----- >8 ----- >8 ----- >8 ----- >8 ----- >8 -----