From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#58326: Reading unicode user inputs from minibuffer Date: Thu, 06 Oct 2022 10:45:24 +0200 Message-ID: <87mta9732z.fsf@gmail.com> References: <4JeAP4C-ZmLaQniOjh6tgvkryDVmyM6G9LF_Pb__wtnB5A8OG4aAkveITKDWok0Gf5BhSs014vvS2bdmqlUmfsLVqz1BWlvAOLXlEAFLLIM=@proton.me> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11704"; mail-complaints-to="usenet@ciao.gmane.io" Cc: uzibalqa To: 58326@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 06 11:23:43 2022 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 1ogN6U-0002w8-IY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Oct 2022 11:23:42 +0200 Original-Received: from localhost ([::1]:40188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogN6T-0008Qf-KS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Oct 2022 05:23:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogMW2-0003Io-JA for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2022 04:46:15 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogMW2-0007iT-BQ for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2022 04:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogMW2-00032o-7D for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2022 04:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Oct 2022 08:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58326 X-GNU-PR-Package: emacs Original-Received: via spool by 58326-submit@debbugs.gnu.org id=B58326.166504593511660 (code B ref 58326); Thu, 06 Oct 2022 08:46:02 +0000 Original-Received: (at 58326) by debbugs.gnu.org; 6 Oct 2022 08:45:35 +0000 Original-Received: from localhost ([127.0.0.1]:58920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogMVa-000320-Ol for submit@debbugs.gnu.org; Thu, 06 Oct 2022 04:45:35 -0400 Original-Received: from mail-wr1-f41.google.com ([209.85.221.41]:37864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogMVZ-00031n-5B for 58326@debbugs.gnu.org; Thu, 06 Oct 2022 04:45:33 -0400 Original-Received: by mail-wr1-f41.google.com with SMTP id bq9so1591102wrb.4 for <58326@debbugs.gnu.org>; Thu, 06 Oct 2022 01:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=iNfT4mX9EsCGorKx5PPo5hR58YBhWTkrndPtSwfueHs=; b=q5wrZTNkFkSLNDnfQKj7gc6cACPK7ouV+TNWuYeE8SGhoLq1uNCcBtGPqtDNiBW5A+ Ubc8xS8mt2aEtzy3bxm7iQWYGFoo+0Zr6YO+zWNb7MMihjojXie29CxXguQQh33Gd66S c57AsQ9a32Kuxru5BtKJGsYyL34vWTu9NJKqe64w1E+HEsnFzyBCgky5aOfYbGG3nvLo 8G58AYRrNo4FI0ofOcR2sLcPyzjj3mG02iovlB7ToBzehlzGWMwzQUNM2CTsHuVq8SZ9 xjS3ILBcKPsKnyd94iFyPCJsskANvvGImskhNmwW7JhZR6nrs0WaaOBJN7+Ga4qi6E9b ch0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iNfT4mX9EsCGorKx5PPo5hR58YBhWTkrndPtSwfueHs=; b=Swq6A17miMHEWwLBXkZqHlp2JIagYFnWUYP5/rLE/oonJZAZ1wBnvSwWK3ZDkoGFHK X0N+hha1/rmodWNzQJizafDqWW163cJ9wCZ/fizAo/ShzHpDRZhpgkZnYCPikNGp/8/0 qs+Fk55lOZA1M4bcIPgIaYecpLM8iyn6b2y2bUslCAbgit+tI5T46kzbNQjxy0yCQLFb GB8uxFEF6rbifp315y3kkB+2L98vX5dvd8wRX76aNqWkpYUBfdqTSNFxsaSrJ0XJvppI R6hue/CiXY+RZKDZsAMn6aF5E0xTGXZOyjoXh8k1zjaNGBvHb8HWflCZSRWll02UDzmQ JTxA== X-Gm-Message-State: ACrzQf040CFzKGEMtXpX4bobcXyy2+EtrXB2/WbgHJRXEB2omWxduVM0 Nhcy6z7cDFPLaH8ieQnc6vw= X-Google-Smtp-Source: AMsMyM40Jg6rJ0CDTn+PULhNmSch+y+Zzc5q8wojRrfjNm/qbyUsnUmuP5mOfeqQ28bu4bxiDqCrYw== X-Received: by 2002:a5d:5850:0:b0:22b:1ada:a0d1 with SMTP id i16-20020a5d5850000000b0022b1adaa0d1mr2238228wrf.313.1665045926367; Thu, 06 Oct 2022 01:45:26 -0700 (PDT) Original-Received: from rltb ([2a01:e0a:3f3:fb50:912:1b38:fb01:987c]) by smtp.gmail.com with ESMTPSA id b6-20020adfde06000000b0022e2eaa2bdcsm14558567wrm.98.2022.10.06.01.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 01:45:25 -0700 (PDT) In-Reply-To: <4JeAP4C-ZmLaQniOjh6tgvkryDVmyM6G9LF_Pb__wtnB5A8OG4aAkveITKDWok0Gf5BhSs014vvS2bdmqlUmfsLVqz1BWlvAOLXlEAFLLIM=@proton.me> (uzibalqa via's message of "Thu, 06 Oct 2022 03:42:14 +0000") 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" Xref: news.gmane.io gmane.emacs.bugs:244619 Archived-At: >>>>> On Thu, 06 Oct 2022 03:42:14 +0000, uzibalqa via "Bug reports for GNU Emacs, the Swiss army knife of text editors" said: uzibalqa> I am using "read-char-by-name" to read utf8 hex codes uzibalqa> from user for input to "glasses-separator". But because uzibalqa> "glasses-separator" requires a string I have to do uzibalqa> (string (read-char-by-name "hex: ")). Meaning that uzibalqa> users cannot pass "\u2192", but have to use "#x2192". uzibalqa> Yet, using "completing-read", the list can contain uzibalqa> "\u2192", which works fine. I am also unsure whether uzibalqa> there is an inconsistency with uzibalqa> display-fill-column-indicator-character which also takes uzibalqa> unicode. uzibalqa> Could the setting up of "glasses-separator" be uzibalqa> simplified? Could "read-char-by-name" be extended to uzibalqa> accept hexcodes like "\u2192", or is there some other uzibalqa> function that can handle the different unicode inputs uzibalqa> from minibuffer better? I suggest you read the docstring for `read-char-by-name' more carefully: Accept a name like "CIRCULATION FUNCTION", a hexadecimal number like "2A10", or a number in hash notation (e.g., "#x2a10" for hex, "10r10768" for decimal, or "#o25020" for octal). Treat otherwise-ambiguous strings like "BED" (U+1F6CF) as names, not numbers. Robert --