From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 3884A42E77 for ; Wed, 11 May 2022 07:46:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C137368B361; Wed, 11 May 2022 10:46:38 +0300 (EEST) Received: from server6.ceeqoo.com (server6.ceeqoo.com [178.77.101.243]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 79C6068B18A for ; Wed, 11 May 2022 10:46:32 +0300 (EEST) Received: from mailix (www.noaport.de [109.90.164.154]) by server6.ceeqoo.com (Postfix) with ESMTPA id 801F6BA676 for ; Wed, 11 May 2022 09:46:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=noa-archive.com; s=default; t=1652255191; bh=BVQe9dT/J6N/wP5+xfV7quXn0rcEOVNSwLpz00B8yxE=; h=Received:Subject:To:From; b=R0pmWrjvPitQqjS2iBEdYE4ESJxvurzhAxjIPY5qZtjseO/eRxTkRhUGsD5umhQMF s8RvzKMdkbowSaylwrsUXvUTi+USwyALEtejZbCTZZZk3ibxrAHBxdI+oOB5sOyLNi SIEWrpZBqjQTUBQjGi0zJX37iWTlCNV/9U4mebpc= Authentication-Results: server6.ceeqoo.com; spf=pass (sender IP is 109.90.164.154) smtp.mailfrom=t.rapp@noa-archive.com smtp.helo=mailix Received-SPF: pass (server6.ceeqoo.com: connection is authenticated) Received: from [192.168.0.125] (Unknown [192.168.0.1]) by mailix with ESMTPSA (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128) ; Wed, 11 May 2022 09:46:31 +0200 Message-ID: <40ff7ed7-3583-104f-4c51-91eeb9847d38@noa-archive.com> Date: Wed, 11 May 2022 09:46:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: From: Tobias Rapp Organization: NOA GmbH In-Reply-To: X-PPP-Message-ID: <165225519175.356.15271778755667802043@server6.ceeqoo.com> X-PPP-Vhost: noa-archive.com Subject: Re: [FFmpeg-devel] [PATCH v11 1/6] libavutil/wchar_filename.h: Add whcartoutf8, wchartoansi and utf8toansi X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 11/05/2022 01:32, Soft Works wrote: >> >> [...] >> >> The prefixing can be implemented as a function and then be used >> in file_open.c. >> >> Other file system related functions like mkdir, rename, rmdir, etc. >> are already intercepted in os_support.h, and the prefixing can be >> applied there. >> >> Maybe I missed some cases, I have not fully analyzed the situation, >> but surely there are just a small number of places that need to >> be changed and not 587. >> >> >> For the procedure of prefixing I would take a look at how it's done >> in .NET. This is probably the most mature code for handling this >> and might save us from dealing with issues and regressions until we >> got it right. > > The logic they use is here: > > https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/IO/PathHelper.Windows.cs > > Probably it can be simplified a bit. Out of curiosity I searched for some automatic path prefixing code and the author of this file claims that it should be handling most corner cases: https://github.com/JFLarvoire/SysToolsLib/blob/master/C/MsvcLibX/src/mb2wpath.c That amount of logic inside CorrectWidePath() does not look appealing to me. And even if we simplify that now I guess it will grow once the corner cases drop in via bug reports. So I'm in favor of removing the MAX_PATH limit, converting needed Win32 function calls from ANSI to WideChar, and adding the longPathAware manifest flag. I think the activeCodePage=UTF-8 patch could break Windows applications that expect the system-wide ANSI codepage to be used for FFmpeg text output, though. Regards, Tobias _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".