Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2763017ybl; Mon, 20 Jan 2020 08:54:17 -0800 (PST) X-Google-Smtp-Source: APXvYqyOn9+LSDBgkScGZOGleah/EToNmJ717P3iA3ZacopvV/LY94+w4lPcygJsWNAWr1a0BNrV X-Received: by 2002:a9d:62c7:: with SMTP id z7mr250961otk.189.1579539257666; Mon, 20 Jan 2020 08:54:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579539257; cv=none; d=google.com; s=arc-20160816; b=esm68aUppS8TS513HUdqAOfQAArl+wxNFhmCgx2tLbJPsQJ2d84P/sjAEpy6kRLK/9 sqzFoWnBJiIutndER+ZVRCxC1tROScb5mGUtsRhcDbwxN/4XWo8RpEy7vL6uYM/cUyM+ CbXCj3OGonVM9yX+OuUIUbmfxilt98xhky/nB4CKeEd0XZ7u1LQzlbbYBosH8/ks5f4+ efVD2BFw5UXPujwJrd4dN1P2Ca4BJOxMumErghNyaHAkhEYHzHvWFya/5lUuLtOBlM2m PSUeCMmL+RGlD/a19kS/C5EC9Rms98uQacmKdNg0lgvccXzYB19oRGQjkjwk0Hbi5P2u Ny8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=UBg751agJWL0KpeB2Dlpu1KmoLGoUMs2Ia5aX1B2CEE=; b=M0Ts/wBf6JXqgyf/QQ67NHOTJayHGHQ9qcLnu+Rt50CHfceXxsRjw0RJQNG58nZ3/m abWkg4s9gz9HBfs7l5X++eo0e0xTk+hL4U56DlHyGwQnRGVTKGXQjuqSvdn6s2KGFP4H 3inLUVbg4JeW7sejQ18oXqQU7bBHWcvhTidjNBJtRVDIIeT6XAVadSFWuXqPqYUaahY/ imtuY+kkIQNOxu1GvYHO4s/O/74Z0x1sEVi8MqXlf0Hdz+CtLkcqKBF7T0VK4BIpZCgQ sBek4DZdckiN1fj68Aak4LJ57uxLrvNF5JCPb32OS/vhzedkvjWoCr6j2Hkr9xzg8HCm bfrg== 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 y127si17841017oiy.250.2020.01.20.08.54.06; Mon, 20 Jan 2020 08:54:17 -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 S1729045AbgATQvi convert rfc822-to-8bit (ORCPT + 99 others); Mon, 20 Jan 2020 11:51:38 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]:44860 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726897AbgATQvi (ORCPT ); Mon, 20 Jan 2020 11:51:38 -0500 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-154-mp5ZcybCPZC3Psf2uuXE4w-1; Mon, 20 Jan 2020 16:51:35 +0000 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 20 Jan 2020 16:51:34 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Mon, 20 Jan 2020 16:51:34 +0000 From: David Laight To: 'Al Viro' CC: =?iso-8859-1?Q?=27Pali_Roh=E1r=27?= , OGAWA Hirofumi , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "Theodore Y. Ts'o" , "Namjae Jeon" , Gabriel Krisman Bertazi Subject: RE: vfat: Broken case-insensitive support for UTF-8 Thread-Topic: vfat: Broken case-insensitive support for UTF-8 Thread-Index: AQHVz4FsiOVqsS4Qp0SucuDN4afIhKfzph4wgAAFE4CAAADOMIAADbUAgAAIwlA= Date: Mon, 20 Jan 2020 16:51:34 +0000 Message-ID: References: <20200119221455.bac7dc55g56q2l4r@pali> <87sgkan57p.fsf@mail.parknet.co.jp> <20200120110438.ak7jpyy66clx5v6x@pali> <89eba9906011446f8441090f496278d2@AcuMS.aculab.com> <20200120152009.5vbemgmvhke4qupq@pali> <1a4c545dc7f14e33b7e59321a0aab868@AcuMS.aculab.com> <20200120161206.GC8904@ZenIV.linux.org.uk> In-Reply-To: <20200120161206.GC8904@ZenIV.linux.org.uk> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-MC-Unique: mp5ZcybCPZC3Psf2uuXE4w-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Viro > Sent: 20 January 2020 16:12 > > From: Pali Rohár > > > Sent: 20 January 2020 15:20 > > ... > > > This is not possible. There is 1:1 mapping between UTF-8 sequence and > > > Unicode code point. wchar_t in kernel represent either one Unicode code > > > point (limited up to U+FFFF in NLS framework functions) or 2bytes in > > > UTF-16 sequence (only in utf8s_to_utf16s() and utf16s_to_utf8s() > > > functions). > > > > Unfortunately there is neither a 1:1 mapping of all possible byte sequences > > to wchar_t (or unicode code points), nor a 1:1 mapping of all possible > > wchar_t values to UTF-8. > > Really both need to be defined - even for otherwise 'invalid' sequences. > > Who. Cares? > > Filename is a sequence of octets, not codepoints. Its interpretation is > entirely up to the userland. For filesystems that really ought to be true. Saves a lot of problems in the kernel. I guess the fat driver has to do something to convert the UCS-16 on-disk filenames to/from a sequence of octets. Even Microsoft have made it much easier to have case-dependant NTS4 filesystems in windows 10. (Ever watched the number of different cases in the list of c:/windows/system32/drivers/*.sys filenames output when windows boots? They are nearly all different!) - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)