Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2132541ybf; Mon, 2 Mar 2020 02:38:28 -0800 (PST) X-Google-Smtp-Source: APXvYqx00F0k81Br1qh0OojZCsWy13jznP2Emzzo4+nKpcOSR/kYU4msKULXzbNXX+094SlUMkt/ X-Received: by 2002:a05:6808:191:: with SMTP id w17mr10711940oic.29.1583145507216; Mon, 02 Mar 2020 02:38:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583145507; cv=none; d=google.com; s=arc-20160816; b=Argmg3l5e8wUqmZpOLaMahK9TOhohQk5g23bqDCumkb4ex227a3BLa/ilDIargY6G8 axXoNj6eJLgxgrtNInnEUAoIf0n3RTgXFPqe9q6MLQUoQSgBUrejkKUcPUEVtggvkNYq n8peRaiWYDuxm7+EG9b3nTTXI7TdLlTraEulxxxjXvj3rzHt1x8yfZFY1LxnT5foxF1g XLavQc4CcD+UAv8e3d/1iDso4uSg91+DsICzK91Tk47WatNeqaCOhsLC5MM1nHFoPGD/ 8ju+J9V72dwCr+lDZbltA14vOmOYavoqWzzzmVlFxepgGQD64KIc2PK0MQI9bX7QIbCU sqSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=z9kWke3YJbtDrj+MGPo0YA20bI98f46pEK1BDnN9+NE=; b=cFPM5mgnirRkvjMulm6fbl2y0KDHn5nwv54pkYr0a6tZk8VJp4rJYcuHji/mcDWO/h KEXHJmyKHO9H+NkCUS3Jka5+b9oiR3pULSQ6g+lzTWvAo+lGSJaqM96rZeCySz6e6cTD ttUM7eWQySiIaQXSWinytE3TTQErDzJ3B0DQCdkSPgcv+eN4eMU6sGSb9Rsg/4ZRjWgR zLA5ovYwzo7FcWSZDfHUd1LeJG9B3fyq9ReE28FLRtdpc0AqBfhy9uTCWDtkHcvJn1+i jC/0xlv6no/hEfvwM2YbNAXx7N89sakVGGj142Lb1XUqIlEmBNkgOGbz2O1mS/8Xzkpo p+dg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a205si6074520oif.159.2020.03.02.02.38.14; Mon, 02 Mar 2020 02:38:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727210AbgCBKiL (ORCPT + 99 others); Mon, 2 Mar 2020 05:38:11 -0500 Received: from mout-p-101.mailbox.org ([80.241.56.151]:21402 "EHLO mout-p-101.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726674AbgCBKiK (ORCPT ); Mon, 2 Mar 2020 05:38:10 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 48WGnV3GqqzKmgS; Mon, 2 Mar 2020 11:38:06 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id titW3oOKldKy; Mon, 2 Mar 2020 11:38:02 +0100 (CET) Date: Mon, 2 Mar 2020 21:37:54 +1100 From: Aleksa Sarai To: lampahome Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: why do we need utf8 normalization when compare name? Message-ID: <20200302103754.nsvtne2vvduug77e@yavin> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vt4djlomkycskysi" Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --vt4djlomkycskysi Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-03-02, lampahome wrote: > According to case insensitive since kernel 5.2, d_compare will > transform string into normalized form and then compare. > > But why do we need this normalization function? Could we just compare > by utf8 string? The problem is that there are multiple ways to represent the same glyph in Unicode -- for instance, you can represent =C5 (the symbol for angstrom) as both U+212B and U+0041 U+030A (the latin letter "A" followed by the ring-above symbol "=B0"). Different software may choose to represent the same glyphs in different Unicode forms, hence the need for normalisation. [1] is the Wikipedia article that describes this problem and what the different kinds of Unicode normalisation are. [1]: https://en.wikipedia.org/wiki/Unicode_equivalence --=20 Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH --vt4djlomkycskysi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSxZm6dtfE8gxLLfYqdlLljIbnQEgUCXlzh/wAKCRCdlLljIbnQ Et6tAQCq8ZXt+A2whrSxyf0bcHdIFSYEonsJIKRgPmRE16VhpgD+IoBvz+ekhdw1 q7VArnP8oJQ/PLZkF3Cs2fO4Y7j2sAs= =Ed33 -----END PGP SIGNATURE----- --vt4djlomkycskysi--