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 81AF3434AC for ; Mon, 13 Jun 2022 20:53:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5E92168B5EF; Mon, 13 Jun 2022 23:53:31 +0300 (EEST) Received: from msg-4.mailo.com (ip-15.mailobj.net [213.182.54.15]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 404D568B2AF for ; Mon, 13 Jun 2022 23:53:25 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1655153604; bh=dPCf1yE7ZWzCidpY5C5HfUZmv2K4dFtggB6FFqIiv0U=; h=X-EA-Auth:From:To:Date:Subject:MIME-Version:X-Mailer:Message-ID: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=KfYQO4z7TgRapMzS+g29nX4ogNlzNNqe4mhvzcpbMMv4Dh0p5WekvdNGRSJQOOkHZ SquKK2gAOXz9Wb+OkyAgmsM2cFV3pEEyA9y3pyoUsV5dE4nbSLjcI3HRrbm9MJ3cm9 1Sx6IO6tuTcmD3kk8afPwBbJMnBlX2nUhliTKSao= Received: by www-7.mailo.com with http webmail; Mon, 13 Jun 2022 22:53:24 +0200 (CEST) X-EA-Auth: A7HpV9xrOw6wyaUECoYQriMShj6qJ5NvEuTHviQkaIGTVz/qSu0VMD0HgUJ3cB+ydz+6Ei/DlMrV9le3m4RJdwmsYfEtQ9rq From: nil-admirari@mailo.com To: ffmpeg-devel@ffmpeg.org Date: Mon, 13 Jun 2022 22:53:24 +0200 (CEST) X-Priority: 3 MIME-Version: 1.0 X-Mailer: COMS/EA21.01/r20220415 Message-ID: In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v14 4/5] libavformat: Remove MAX_PATH limit and use UTF-8 version of getenv() 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: > I like the version check. I don't know about all the derivatives > of AviSynth, but I assume you have checked that it's valid for > the common ones (or at least the original non-Plus variant)? Interface version was changed to 7 in 2020: https://github.com/AviSynth/AviSynthPlus/commit/40900dc1c54c14ea9f188c7242b88d464d067a44 three years after utf8 was implemented. If I'm not mistaken, there is no way to check for a particular revision. > Two ideas came to my mind how this could be done better. > What's actually needed here is not a string conversion, we need > a valid and usable filename, and the function could be more > something like "get_ansi_filename()". > > The first thing that this function could do is to convert the > the filename to ANSI and right back to UTF-8, then compare the > UTF-8 result with the original UTF-8 string. When both are equal, > we know that the conversion is safe, otherwise we know that it > won't work. > > Then, we can use the win32 API GetShortFileName(). Which returns > file and directory names in 8.3 notation which (IIRC) contains > only letters which are valid in the ANSI code page. > > 8.3 file names do not always exist (depending on system config), > but it's always worth trying. > > Should both of these procedures fail, we could at least output > a useful message, explaining why it doesn't work. > > Let me know what you think. Too much work for something that was fixed on AviSynth+ side two years ago. _______________________________________________ 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".