From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13708 invoked from network); 23 Oct 2022 10:13:09 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Oct 2022 10:13:09 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1666519989; b=jseuIXwPao57l/s6RHw/pxeESMzva0kDjIS2/D5VymltvqYiKrpJmtaSz4SsozP7rcW7P/vr1P Deoc3O5LYL+vd6UmabOJPe/ggz5HDQVYiBLdOw0I4ApSqWrASVHuMvRNErvxhNRL3WvgLgzfSv j1jL0vTQr1QVbI85kis2Qb3eDAZ7y+STRvk+OQvJnFmIUdE7hUUj9XStt6tqCMHIiuZyyH6+vA 63EFpOudejqENbJlD5xjrzqNwzmPfAxJKrJ2okc2RCUx21CircHFYr50qH+KnSQ5ssdHqVfA3U smtqWRedKK3wxYZk3TWSFb808c7I+C7m0yjE9nXnieFXnA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yw1-f179.google.com) smtp.remote-ip=209.85.128.179; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1666519989; bh=3BK0sM2vCT6K8qmHvV4FHJ3/Pk23W79J3GJp9Aotm0A=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=E0cIMH2LS1NGuwTEg+mb0f/GmxR9f4NLBKiMY6nTUnupNlIKUu6JkQwgvSgAemzSVArOfWye8C XR29UPdcdy4+iG5aAbHN91iy1w0mfV68Ck1E5X3G73No7cWLZ23GCM5lQz4KfstgxhRNGUzZZV oFljWnj9Svk3WZuLa0/9Cv5vi7h8VNy5eW/+m9stDgj06caTHvVlCX0DD5Lesf3qWWSkc8iZQf 7XFSRUxg/uQCJ42j10cS9JkXh2iUFEK4l1RkAKFq/DsnT5oJzRTP0E/SCIc7/lREi0foBfqXLw U7hZGFKo4WD2mtXxPjLi021yh8VYMsYPbayo8LYsaVaTSA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=LhZPCWDmVyZn9r12zCuC5iE1XtJoovU1J4lqIdIRQek=; b=Jd9ZqhhM5KtrL9gKbTbXIaj017 TkzW+ev/Sdrtx7sMyQvUOobhUyuUg4OEyGViVcaPj8B8tYrR26/+4tgF9EcBDdILVlf3up22Af4jx kmt+QkAg3iBxLpgXM+mDUDvYTuhdSMa9azzhQ96Q+DmYLGTl0bcZKCFq2Gxfl9UBt9dQqBD/mqnVs mCtQUp3cvPml058pkvdDiQMOT2IOeWW64gyJFCnbuLbrDX0IcSKLdB+QV8v9o0XvjK5HiiqTI7J7K fkiE51e1NvY/X8mDf1EuDOVttVyURVuWtBKA7t1cgFhoCwl4ZPc7YWVWXQ9n8+uAcy/LtMXc6nDV9 GrciRi0A==; Received: by zero.zsh.org with local id 1omXyd-000Emr-Sr; Sun, 23 Oct 2022 10:13:08 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yw1-f179.google.com) smtp.remote-ip=209.85.128.179; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-yw1-f179.google.com ([209.85.128.179]:40533) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1omXy3-000EQP-Rp; Sun, 23 Oct 2022 10:12:32 +0000 Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-36a4b86a0abso46412837b3.7 for ; Sun, 23 Oct 2022 03:12:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=LhZPCWDmVyZn9r12zCuC5iE1XtJoovU1J4lqIdIRQek=; b=TyTyyjdK98XYpoZ00uoX82yi/Rd4woaaKKGyqeU7cmFf+yfCfGvVMGftLdrNKQrA2+ IFbmIl+8l3fxPMLB172dNRU2yrFIVuZCj47LZqOxjG99jGfF3fClotf27AWRRsqm0ORk IgQjHLeirSfXISEYG4h+7lKdTMDQ79YLhfFls41u4y4xNId44Gr5JwHhSHL5tV/oi6Cv aqYZ4LWKTYo0j4BLzT+5HAW3jMxCM8lz71zXygTEkr1scSqqh3n6HW/0rUyEkCgyHbbw I31ZpmBKta44gVx+YS3RWGjBS6dcBcR80noW08HBJsSnVqg5hoTksMbsdZkEjprTR3ov OB8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=LhZPCWDmVyZn9r12zCuC5iE1XtJoovU1J4lqIdIRQek=; b=QCp0AmEuj4PyT8ofBdvtgN8yaTdXWVkINYk0QMAXNmvbgmZCvRbKOZnWtj+2Ybnnm6 GZlc8v8txsTiUw0+PftTKD69PZWbowFYiS0lN2nmc/wlgrUzmXjLUtHJ76sr0mBKPXBf RyTWlcIPewKr708jRpT0lUrUTVQW48kwtL+0aKpaPQeNpuJynlAuKkhD6wtwC9uuHQ9L z8f+6DEm2kAkVXVcVIdbtiSlBelxjMT9hiUIl82SOojZz+ctP2ceh9SZjMmTuiKyGMLb lVFQYIP1PuUZbZ6PQu+ScZuolBX7KwqHxX4mDweOf2G59DqIxezyVVomrDBEs/YQ47ee 8Zfg== X-Gm-Message-State: ACrzQf0KtFvsCsbtzLzu7NlS9OBSl9ThWMp4jKEQKAc4erq1uR2gCSn1 tL8VRdQvL0IJz3DW1OMHbWG301O/Ldmm/mXGLOD5VGG1Lw0= X-Google-Smtp-Source: AMsMyM4UOT03qeDbuOMeui1VWzVOgqnXeao3S7IHv7x/mBZjcAUtIZuZZewXFAYMLvBehUr7h8ZQLs4Ld0nEl2VEY2k= X-Received: by 2002:a0d:d697:0:b0:36b:65c7:5b9d with SMTP id y145-20020a0dd697000000b0036b65c75b9dmr4575653ywd.321.1666519949780; Sun, 23 Oct 2022 03:12:29 -0700 (PDT) MIME-Version: 1.0 From: Roman Perepelitsa Date: Sun, 23 Oct 2022 12:12:16 +0200 Message-ID: Subject: UNICODE Private Use Area characters in BUFFER To: Zsh hackers list Content-Type: multipart/alternative; boundary="0000000000009e2b2e05ebb0e9f7" X-Seq: 50809 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --0000000000009e2b2e05ebb0e9f7 Content-Type: text/plain; charset="UTF-8" Zle cannot display UNICODE Private Use Area characters in BUFFER. % f() BUFFER=$'\uE0B0' % zle -N f % bindkey '^T' f % Expected: the last line shows the glyph for U+E0B0 (whichever way the terminal chooses to render it). Actual: the last line shows in reverse video. I haven't looked at the code but my guess is that zle assumes that characters from Private Use Area never have a native reasonable representation, so it attempts to show codepoints. This assumption is incorrect. I think Private Use Area characters shouldn't be handled specially. If there is no glyph in the terminal's font for a character, let the terminal decide how to present that. Note: Private Use Area characters work fine everywhere else. For example, in PS1. Roman. --0000000000009e2b2e05ebb0e9f7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Zle cannot display=C2=A0UNICODE Private Use Area character= s in BUFFER.

=C2=A0 =C2=A0 % f() BUFFER=3D$'\uE0B0&#= 39;
=C2=A0=C2=A0=C2=A0 % zle -N f
=C2=A0=C2=A0=C2=A0 % bindkey '^= T' f
=C2=A0 =C2=A0 % <Ctrl-T>

<= div>Expected: the last line shows the glyph for U+E0B0 (whichever=C2=A0way = the terminal chooses to render it).

Actual: th= e last line shows=C2=A0<b0> in reverse video.

I haven't looked at the code but my guess is that zle assumes that ch= aracters from Private Use Area never have a native reasonable representatio= n, so it attempts to show codepoints. This assumption is incorrect. I think= Private Use Area characters shouldn't be handled specially. If there i= s no glyph in the terminal's font for a character, let the terminal dec= ide how to present that.

Note: Private Use Area ch= aracters work fine everywhere else. For example, in PS1.

Roman.
--0000000000009e2b2e05ebb0e9f7--