From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Anand Tamariya Newsgroups: gmane.emacs.devel Subject: Re: Unicode combining characters Date: Thu, 27 May 2021 12:30:04 +0530 Message-ID: References: <83k0nmbubk.fsf@gnu.org> <83v975ac4s.fsf@gnu.org> <83lf81a04l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bcbe7f05c34a4fe5" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17280"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 27 09:02:20 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lmA28-0004OQ-Cn for ged-emacs-devel@m.gmane-mx.org; Thu, 27 May 2021 09:02:20 +0200 Original-Received: from localhost ([::1]:37936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmA27-0002v3-2B for ged-emacs-devel@m.gmane-mx.org; Thu, 27 May 2021 03:02:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmA0K-0001b6-RG for emacs-devel@gnu.org; Thu, 27 May 2021 03:00:28 -0400 Original-Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]:33441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lmA0B-0003M9-0S; Thu, 27 May 2021 03:00:28 -0400 Original-Received: by mail-io1-xd2e.google.com with SMTP id a6so3795338ioe.0; Thu, 27 May 2021 00:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FXFb5gOa99gUr2FhAd8O2a+GFhNFOficeA0Tc8sYIRo=; b=iMAk0KQcWX3gT7mobf2omicFakFUIF8v4zJ+fXopd8LdT1ftZ49xXOyJtkYCLUE2Aq g5TbOpepBBmJa7q+f1ut5L+N1hORf6dq/PTUMLMox5//GboPMb9ahrtb2fIXBO4gQo39 2Yh7jNQe8zj7zUXw4dh0QwRMh3vNXrS4dPfTtB5tpZSpKnHs8717QMMbI9a84fyrM+Fq NghQVwDVi+smdd/b4G+wbgOIgFB3kVDmPjMIBsCp/nnLbqPx/SsR6SDwK5s4YtmvGPro 0BndTvSxcT5dUNo0n0B6e/mC8P/kSLfPiFSn/5Uyuk6Pf14VeITMyxpCL9Q5TtHY/kl6 sxWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FXFb5gOa99gUr2FhAd8O2a+GFhNFOficeA0Tc8sYIRo=; b=tA4zvIP8G0DV7h7yy101tdK9s/LRqOkD++wA5zrxa31jWI8YQszJa9YAkaEMgmxwva 0XMOH+UbsMUwwHpJWnTCGNxItt04ihy1pnE9u5cUQLrMVo0rfwEqDKXVzPPWIRcFkeeM /jQqqoVGxzPUD3l+v3fqchRRsTisf4sdWj8uHiwn4F+hiUuv0IA4AtBLRKgofPcTRKTv mXVQGW24MNZG02+hSUI3+1S55OyvX/qhae8usP3UJN9X1StiuOjhw0RnXbP5m2FbxL4v bj+C4URmENvyNZAQFj8IvPDZbmMhyH8JrM1b0ErM1CYhY2GpCKLiq+5rl0ueE3f/xymD vuJg== X-Gm-Message-State: AOAM533INxnZt9MvyQQ67Fr8lcRtLMDuEqe3OSmO3E0yg2iiWk2TAtZn 4Pl8o+zk9H+bJzfMtPvqCVeR680gfuvYZAd4Dyi4C0vsmNQ= X-Google-Smtp-Source: ABdhPJyQF5spIEIdkdWn/++I+0WLQJYmfYSJuQlRRTRZgXUOjsOmTE2zYCNb34WgLvZCmgkW2JZy7N1LvnJ/PIxf2sk= X-Received: by 2002:a6b:7901:: with SMTP id i1mr1725493iop.41.1622098816317; Thu, 27 May 2021 00:00:16 -0700 (PDT) In-Reply-To: <83lf81a04l.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::d2e; envelope-from=atamariya@gmail.com; helo=mail-io1-xd2e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269936 Archived-At: --000000000000bcbe7f05c34a4fe5 Content-Type: text/plain; charset="UTF-8" > > Please try the latest master branch, I hope I fixed this now. > The fix works for the given example. However, here's another one that ideally should be one composed glyph (validated by moving the cursor over the glyph) but counts as 2 in string-width. (setq ra (string 2352 2366)) (string-width ra) ; 2 ;; Glyph in a word (setq shankar (string 2358 2306 2325 2352 2366)) --000000000000bcbe7f05c34a4fe5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Please try the latest master branch, I hope I fixed this now.

The fix works for the given example. However, h= ere's another one that ideally should be one composed glyph (validated = by moving the cursor over the glyph) but counts as 2 in string-width.
=

(setq ra (string 2352 2366))

<= /div>
(string-width ra) ; 2

;; Glyph in a = word
(setq shankar (string 2358 2306 2325 2352 2366))<= /div>=C2=A0
--000000000000bcbe7f05c34a4fe5--