X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D397385770B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1681739253; bh=1jmmFr9K2UOvHZQGwVa4WijYHw6WOrAFf8N3M3AUcUU=; h=Date:To:Cc:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Mcs4wL58nA5hBrNZEM1lzYs0Gk4RE3KkE0u/md2znaQ5Umaja9uGG20jh1dkDh/xn zv3pw/FJskj0IWPi/KmpXIP1pbvqCBfvXBr4eDK3vU47lu6CpCWG4QnzQslmrLJxk/ 1xONC0DGgu93VasQihXKFa0CKpnidNxkuH3Ibz7Y= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 74AC33858C2C MIME-Version: 1.0 Date: Mon, 17 Apr 2023 15:46:52 +0200 To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Subject: Re: Can not stat file with utf char U+F020 In-Reply-To: References: <992b3c28d7f1cfc17f7c9bb47b53f770 AT assyoma DOT it> <1274a3199d9bedab4f15d209694c6e1f AT assyoma DOT it> Message-ID: X-Sender: g DOT danti AT assyoma DOT it X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Gionatan Danti via Cygwin Reply-To: Gionatan Danti Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Il 2023-04-17 11:05 Corinna Vinschen ha scritto: > It's actually not the "dos" mount option but specific filesystems > which trigger the conversion from U+0020 to U+F020. OK. > However, the conversion back is handled in a piece of code which has > no information about the underlying filesystem, so the F0xx -> 00xx > conversion is done all the time. Adding filesystem info in this > place is really tricky. Ah, I missed it, thanks! With these new information, I did some progress. First, I use the "dos" mount option to always trigger conversion of space and dot at filename end into F+00xx chars. Now I am able to create such strange-looking file (in Explorer) within cygwin itself. For example, touch "zzs " now results in "zzs+strangechar" in Explorer. Both cygwin and windows are able to read/write such file. But if I edit the filename via Explorer adding an extension (ie: from "zzs+strangechar" to "zzs+strangechar.txt") now cygwin is suddenly unable to read/write the file. It seems to me that the appended chars prevent cygwin to translate back F0xx to 00xx (as the PUA char is not at the end of the filename anymore). So, two paths should be available: - always translate back F0xx to 00xx even if not at the end of filename; - otherwise, if too invasive to do it unconditionally, add an option as "always_translate_pua" (default: off) to enable such behavior based on user needs. I would (naively?) think that option 1 (always translate back PUA) should be the preferred approach, as cygwin is at the moment effectively unable to access some files. Regards. -- Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it email: g DOT danti AT assyoma DOT it - info AT assyoma DOT it GPG public key ID: FF5F32A8 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple