Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: nil-admirari@mailo.com
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v3 4/5] fftools/cmdutils.c: Replace MAX_PATH-sized buffers with dynamically sized ones
Date: Thu, 17 Feb 2022 17:44:39 +0100 (CET)
Message-ID: <ea-mime-620e7b77-1e03-13532d8f@www-7.mailo.com> (raw)
In-Reply-To: <DB3F058D-1743-47FC-BC0B-879C14E21920@martin.st>

> if the path later is going to end up in a codepath that expects it to be UTF8 (please do check!), then we should go that way instead

I checked. datadir ends up in (cmdutils.c:2104)

    base[2] = datadir;

and base[*] are later used in (cmdutils.c:2112 or 2116)

    snprintf(filename, filename_size, "%s%s/%s.ffpreset", base[i],
             i != 1 ? "" : "/.ffmpeg", preset_name);
    f = fopen(filename, "r");

On Windows fopen expects ANSI encoded strings, so we cannot change the encoding to UTF-8 without rewriting the rest of the function.



I've also overlooked something from your previous comment.

> unless passing them to an external API

Previous version of the manifest (https://ffmpeg.org/pipermail/ffmpeg-devel/2022-February/293109.html) included

    <ws2019:activeCodePage>UTF-8</ws2019:activeCodePage>

which makes CP_ACP the same as CP_UTF8. Unfortunately external APIs must also opt in for such a change, otherwise they won't be able to decode the strings FFmpeg sent them. A new version of the manifest without code page changes is at https://ffmpeg.org/pipermail/ffmpeg-devel/2022-February/293168.html.



_______________________________________________
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".

  reply	other threads:[~2022-02-17 16:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-16 15:08 [FFmpeg-devel] [PATCH v3 1/5] libavutil/wchar_filename.h: Add wchartoansi and utf8toansi nihil-admirari
2022-02-16 15:08 ` [FFmpeg-devel] [PATCH v3 2/5] libavformat/avisynth.c: Replace MAX_PATH-sized buffers with dynamically sized ones nihil-admirari
2022-02-16 15:08 ` [FFmpeg-devel] [PATCH v3 3/5] compat/w32dlfcn.h: " nihil-admirari
2022-02-16 15:08 ` [FFmpeg-devel] [PATCH v3 4/5] fftools/cmdutils.c: " nihil-admirari
2022-02-16 16:08   ` Martin Storsjö
2022-02-16 16:32     ` nil-admirari
2022-02-16 16:50       ` Martin Storsjö
2022-02-17 16:44         ` nil-admirari [this message]
2022-02-18 20:09           ` Martin Storsjö
2022-02-19 10:10             ` nil-admirari
2022-02-16 15:08 ` [FFmpeg-devel] [PATCH v3 5/5] fftools: Enable long path support on Windows (fixes #8885) nihil-admirari
2022-02-17 16:29   ` [FFmpeg-devel] [PATCH v4] " nihil-admirari
2022-02-17 20:05   ` [FFmpeg-devel] [PATCH v3 5/5] " Marton Balint
2022-02-18 19:03     ` nil-admirari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea-mime-620e7b77-1e03-13532d8f@www-7.mailo.com \
    --to=nil-admirari@mailo.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git