[FFmpeg-devel] [PATCH] avutil/log: in colored_fputs, convert string from utf8 to CP_ACP charset on Windows

Anshul anshul.ffmpeg at gmail.com
Thu Feb 20 17:33:52 CET 2014

Jan Ekstrom <jeebjp at gmail.com> wrote:
>On Thu, Feb 20, 2014 at 10:22 AM, 周泽华 <zhouzehua at gmail.com> wrote:
>> In fact, the output is a messy mix before the patch, at least on my
>> ...
>Yes, it is mixed with strings that don't get converted to UTF-8
>internally. It's a bit messy. Yes. But you don't make that 'work
>better' by making it even worse, by making things that are output from
>the internal representation non-deterministic. In my case, as an
>example regarding my current non-unicode code page and some of the
>languages I know, I would get some CJK strings and cyrillics in
>non-unicode code page, and then strings with öäå would get output
>as-is. This is, if I understood how this patch makes it work correctly
>(output in non-unicode code page if it can be converted, otherwise
>output as-is).
>I know proper Windows unicode command line output as reimar noted
>(find out if output is to a command line or not, use WriteConsoleW if
>it is) is hard to implement properly, and I know that it does not give
>you a quick "fix" for a problem. But I wholeheartedly am against
>converting output to non-unicode code pages, and making it "readable"
>in the command line with that (and actually brushing the underlying
>problem under the mat).
>With all due respect,
>Jan Ekström
>ffmpeg-devel mailing list
>ffmpeg-devel at ffmpeg.org

I do write callback for avlog in such conditions, but it would be good if someone make an option that only use ascii, it would be better if there would be function like avset_log_ch_fmt().
It would also benifit when we redirect log in text file. In text file all the character that are used for color look like garbage.

Sent from my Android device with K-9 Mail. Please excuse my brevity.

More information about the ffmpeg-devel mailing list