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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25538 invoked from network); 23 Oct 2022 16:30:15 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Oct 2022 16:30:15 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1666542615; b=lT5jszh9AjUNNdn/L/IsouAdKhcrNxmAJLOQ/zeQ2J3uqRxKYFhgFnSa48dSH+uKgnOLWgcNMW +LUsh91CXY3pEqZT6fQnUibqBbpTn33SkRr6mrrALjO9z10rjEynslHeX7QOFq/9w9RdiywGPh +dOJ1L46Q32RA/7iQyIap7zD4tpPVxjq54YQKX1FLSfLiGnCnol6wJtjlqMgC79TGrmTBU+hG8 DCtRfUil/xkn5uuv6W3idHl0C0/H1kvRvhCj2113XNj+ZF7Orsb0N/E9587Pss/EBNgFxW3c43 mK0evc1nJ+QDOVmc2GfTccBAdWavK6CbCwzVKycOhQXtqQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f42.google.com) smtp.remote-ip=209.85.208.42; 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=1666542615; bh=0+gALHTO3defMRdDRsnswEqyBQm/scBFlRr1RijgpwY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:References: In-Reply-To:MIME-Version:DKIM-Signature:DKIM-Signature; b=CxUfj53XTt8ExF8nKYhqaZzu9qQwhmlsEis2nDyBS4csRD9S1xX+141CewNCLIc7x4qveSW7lO hoi1v3eacz7fUVwT4uEJVLHQTBqBYnwd4a3vVb/a7fIvjAlpna+kSUeoY+DlCmi2DforvVZagb +t0nlEbjnjIFi0msd++d932EfWf9n9UQQUwbibhk2Op3D12wbxCMBDhsoxkuYROei3UTBUDXzu HP7rAvExjiez4YQEmwTox5gHkBtvHxY9F4vjHrLQ7O4E0z5OqHslg4MJk4iwUwutDsQQhbPuFI oWF4lwe4BfnGzdY/gwZPj9jnwhw7jc44FsuxNh3vPTjjzQ==; 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:Cc:To:Subject:Message-ID :Date:From:References:In-Reply-To:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=YBbnM+/rJoKme22xsoPF/CeDqj1LopDUcZcrbiZd/Bw=; b=LMiWMrlOn8Kl9G1beTGgIzhD7V OhEJytE40OFyISL4CTZEfT2HtRNSpM6UrfOXBvLFlIcrX76P2cJLai+3DseaxUgUdU0kY2CC5upx7 JSs89FQ1Erl6w1j3zYsI3l1e8FMmooNGdTncg2tQze5Pduok67xGB4n0L/jTbE8N3AtstlrKRmtDc 0cTfmdHT36yLtpO+muF9FctR06m/w1/hgsi8KGeFHYKLzJRQocY9kEh3JjSF8xTDPp6Up/g6JgYgy lXlYfnOjlBS3m/U3dBj8kVy7rCKY6rIhJpLzQfDULVx3wKwVnpVlYobWz/pkNwIL1g0fb9I+sPQmH G8WcksbA==; Received: by zero.zsh.org with local id 1omdrZ-000NVo-Pz; Sun, 23 Oct 2022 16:30:13 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f42.google.com) smtp.remote-ip=209.85.208.42; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ed1-f42.google.com ([209.85.208.42]:37790) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1omdr2-000NA0-1E; Sun, 23 Oct 2022 16:29:41 +0000 Received: by mail-ed1-f42.google.com with SMTP id m16so23091968edc.4 for ; Sun, 23 Oct 2022 09:29:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YBbnM+/rJoKme22xsoPF/CeDqj1LopDUcZcrbiZd/Bw=; b=ZRgJOOfe6qUucWFXH3XmK5rU0Z524IWcO8BLtrFpTQEN2glGpINZwMy6wR43KpQMCi eBEcMcVcNdhh9wp4ejyYKL7fNDDvX/G04RKfHJjH5z3++9iyZ5xS7cp4jFBkmZuRo9iA I2wzDqdSnTyxYCAaSYO28bIWVDb21C4EwQJcm2rsGPXQOQIr5GebCejpVw42Azimq2zO qjmdpOD7Yu1svvmOW8VkJzO5/wJjU+QkcQgDz7kk0qbkhsVBRF0j1t93VRzVrjXptq7z Huzcq8qSpJBxZrAL5FhgitkP7sfmGklqFbAOxLlz9PgvFNuuVy8OV3Cr6eUwZoeH+AKH 56ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YBbnM+/rJoKme22xsoPF/CeDqj1LopDUcZcrbiZd/Bw=; b=l1UbcR9bmJqWiRXEKka1uVjdmdaRUJ/xYDSpYrr/izDwh7glGj9Iz2mhtGexrc1xma I6Qmj5JL0ZXxTiAfS9aqs/6xMStIhaNdFK6LqVOm+P5LWk8IuhgJ/7Rio8okMfcTUxfv B/xVaTkvDv9eBwSv3viXnhekucSHmAz6CjtLuALHiPpcyWyZvuRSviKe0JiBm6ys91BP 3BCN6NrT20ZphlYs/fnHT8YpSCwXKPDykzUUIK0lK64FtoqZW+a6T3fLCspEXXAk6Lqt OzLdzFaoSAxDFvhckQBtIGxqpCNKdMkZ0h7FHo2QHva1sq1sOr4gRGs+baoctRADmiOX cALg== X-Gm-Message-State: ACrzQf08CuRgA1LB1v1ajPxP8LnGEfkDPxjykugTyLnwuQgjzVeYRjwt Vds96rVGIk0ECyH19BFGqjOUNpxaK7SsJG3yOLU= X-Google-Smtp-Source: AMsMyM7gnXn/n9zmuWNc6awccm9WX88EYBaQvHRY8Vsbt92BVRvWbefLuXEveaDoTShYMnr0J+7Aqp/UM26tkIZr5o0= X-Received: by 2002:a50:fd94:0:b0:461:5131:d3c with SMTP id o20-20020a50fd94000000b0046151310d3cmr11455894edt.112.1666542579203; Sun, 23 Oct 2022 09:29:39 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:906:a8a:b0:7a6:9215:51b7 with HTTP; Sun, 23 Oct 2022 09:29:38 -0700 (PDT) In-Reply-To: References: From: Mikael Magnusson Date: Sun, 23 Oct 2022 18:29:38 +0200 Message-ID: Subject: Re: UNICODE Private Use Area characters in BUFFER To: Roman Perepelitsa Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 50810 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: On 10/23/22, Roman Perepelitsa wrote: > 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. I'm not sure we have any choice, we have to know how wide every character we print is, and presumably there is no defined width for them as the characters themselves are not defined. -- Mikael Magnusson