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 19506 invoked from network); 18 Aug 2023 15:25:05 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 Aug 2023 15:25:05 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1692372305; b=AnXmN3HfyAoZlSVGI1tpBwP2sMHKdVybikk9SEJV1v1gOpzXBt/egDUNpIpIDR/a9oOCRIlzVV Q0r5ncX3vYgEbS9cLKXCWfWx4wscM1tMvo6YtrUeRu9D3Na/PMXHx1IFCoUzJN1ViWlNcZ7hxl K43xgCuXu78UJ+DvBd0Sw6s7waBCG94hifXDyVJWPDg3p5+hplQZaFikkfk2LMjpMwBXRAgcrz oiAcZSE6ROmrmS0jm+bv8POJhUwAOKH6eUIVnq7cdVAXy0ssLAJOA9wmEM6pVKfLxxe8qdi812 Hgy2YKtNqYSaMzNnvrlXiqPGDiDoMHbKxib2qKTzr76Tvw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f47.google.com) smtp.remote-ip=209.85.218.47; dkim=pass header.d=gmail.com header.s=20221208 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=1692372305; bh=Z/I8kSg4PQ2UE3jILkPkWeCPeIxluPTO7C5sqv6qark=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:References:In-Reply-To:MIME-Version:DKIM-Signature: DKIM-Signature; b=Q0BuXD1h38WY447lK8c3HvAtL53h/gScvSrIBwq8xgrKh8zOCsQkaB3Ar/q82Rep19nP7p2SNm viO36SIDCQF5dFCFHqFcAiO6pFeF/nliSG8gHgNf4l3okmM3KKJuzeN2LYdWt1qpbnOKjQgo2O KDXd/eOoJvHkPx8TzVed5TB8OeVjUjRvvINV8pr81x/jphEI9aNTiVrnzbHGE2HfRB0/PXb79y gytnGMqjTFd2QjaTO9eKWPirGjrDEnRDD5LvTGCBdW6iEq6dVjKg8Oflnyv5bEbHzk/2JayW71 oNG6mKfzmo0XnEHcNKsMlT0xBk1wx6g+9w2VWfee0pBsfw==; 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-Transfer-Encoding: Content-Type:Cc:To:Subject:Message-ID:Date:From:References:In-Reply-To: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Z/I8kSg4PQ2UE3jILkPkWeCPeIxluPTO7C5sqv6qark=; b=UTRLMEKpxrXfp5WL5N+DpeLD21 6rPDcVW/sFhujQf42CnH8LuNcVbmvchlS8oT0XhNMcNMMF2spwB7Ixj/xl6agQR7xSBkPSAmSbiW7 EwDIlQqwZSXjnD6Cf9pFhuYC1k1DMG0iIMnDTMQMIyB2LGNvyvfCwMqb8c10GtWAg9rlBxoI+NT15 ZKrLeLAqyb32vJ0Pae+Ux3/Nz2Bj5N8tnmUCUnHKp/AEYUFz8GL7oi3zaz0qzvFeBVH/B+x82EFHT 5TTf+GW+FGbQgc06dU7yKHVq6w8ONNjcXiig6Lhg8Jy/PVkOa0dTiiTTA03Xw5HK2kgt60TIDoprQ eGyKzFaQ==; Received: by zero.zsh.org with local id 1qX1LU-000181-UC; Fri, 18 Aug 2023 15:25:04 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f47.google.com) smtp.remote-ip=209.85.218.47; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ej1-f47.google.com ([209.85.218.47]:45395) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qX1LC-0000nT-IW; Fri, 18 Aug 2023 15:24:47 +0000 Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-99bf3f59905so132008166b.3 for ; Fri, 18 Aug 2023 08:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692372286; x=1692977086; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Z/I8kSg4PQ2UE3jILkPkWeCPeIxluPTO7C5sqv6qark=; b=TveXhYC1SRXQ+BGqYq6I6R37/YYLJAKrxc/jVLfacNRaDzTg1x762TaLMEC65TfzTq /SUTnVScRNxNAijjDcUpXyeoU3u2IWom4+rMhV3lNdSjdIEAIPhHrcLgaVy5ECCrwZyQ v/ijPOuKxeY6BQrGVXl7PSFyHURqwgWj/NPWHD4rPHYRQlzhgckZA9cgI9xEc205F9i3 6eC35eUluIOV58hxXgmuo6eu9IZhgquZ67S3mo7nb+0W7ZUFyzH9R32zXfJqvh8krzLx ffvmFge6p+6QkuvTQPxfCgR3108JNQQ3pRckw6la3OIgT6yADJNayR17+qQ2OXGn6V9c WCQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692372286; x=1692977086; h=content-transfer-encoding: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=Z/I8kSg4PQ2UE3jILkPkWeCPeIxluPTO7C5sqv6qark=; b=hsVgyem0wp3GPAdNU3+UmsXTFspf5uNmp91wtk8rRPW0F2QQxxECuGyemsSh8PbWlH TzGNf48tWJha8taKjV/O7OFM3s1P2DmoXByET3LO60Miimby0zGIlGXG4d6s0rrpVLfg Cyq9wAhamtME44JjGazj3p/IXtV06H7NPJZ5qRQdK1t842uXjlLE15/coftHpPz3SXq/ fVJZkqJHSTZmR6MfjvZmIK/SBHSNsy5NDJh2X+oYJfBfj3tZ98Y/g7qSTYpviBER0vx2 Kztu5ThT9NUne3lUsqqV6J2ZNyaYcQyUJJvGz1SclTVdGoNuGv22fHGLZjfd7GdxAo7P GWTA== X-Gm-Message-State: AOJu0Yy7pBehLN7ANURGHfflJBYZW7CluPEdwKD9hrqqHltnTLOmlJqX cXKkXNLBlp6tuMK9GQ0NuvE65P7PTlH3u5ywWe1aPj4g X-Google-Smtp-Source: AGHT+IF1oO730Uibd88KDm9naHPJlv5opMahl5s1SJZWjb0D+MbSi+LwjPJOhXhnxw08k726Eb8hzCcDaxFYudd6QVQ= X-Received: by 2002:a17:906:5a52:b0:99b:4378:a5aa with SMTP id my18-20020a1709065a5200b0099b4378a5aamr2465035ejc.49.1692372285792; Fri, 18 Aug 2023 08:24:45 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:907:6d12:b0:99d:dcd3:a2d3 with HTTP; Fri, 18 Aug 2023 08:24:45 -0700 (PDT) In-Reply-To: <3777545.kQq0lBPeGt@norarch> References: <3777545.kQq0lBPeGt@norarch> From: Mikael Magnusson Date: Fri, 18 Aug 2023 17:24:45 +0200 Message-ID: Subject: Re: Unicode ZWJ sequence To: Alexandre ZANNI Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52061 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 8/18/23, Alexandre ZANNI wrote: > Hi, > > I'm new to this newsletter, I don't know if I'm reporting this issue > correctly. All I found is this email address. > > TL;DR: zsh is not handling Unicode ZWJ (Zero Width Joiner) sequence. > > "=F0=9F=91=A9=E2=80=8D=E2=9D=A4=EF=B8=8F=E2=80=8D=F0=9F=91=A8" (that will= probably not render here) is a Unicode grapheme > composed of multiple code points (U+1f469 U+200d U+2764 U+fe0f U+200d > U+1f468). It's basically combining some emojis together to craft a more > complex one. For that the Zero Width Joiner =E2=80=8D(U+200D) and the Var= iation > Selector-16 (U+FE0F) are used. But instead of displaying one grapheme, zs= h > is displaying each individual code point. > As you can see below the terminal emulator named foot is capable of > displaying such a grapheme, and other command line shell like bash or fis= h > are capable of it too, only zsh can't. > > [1] > Using zsh 5.9. > > Is this problem already known? It's actually not possible to display these emojis in a terminal correctly. There is no way for the program inside the terminal (zsh) to know whether the rendering application will combine emojis with a ZWJ between them, and thus has no idea what width they will take up. This makes it impossible to predict where linebreaks will happen, etc, leading to display corruption unless you happen to guess correctly. --=20 Mikael Magnusson