[FFmpeg-devel] [PATCH] avutil/log: in colored_fputs, convert string from utf8 to CP_ACP charset on Windows
zhouzehua at gmail.com
Fri Feb 21 09:45:54 CET 2014
2014-02-21 0:24 GMT+08:00 Jan Ekstrom <jeebjp at gmail.com>:
> 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 computer.
> 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).
Sorry about that I do not understand your example clearly.
You said you would get some CJK strings, so is the metadata of media file in
CJK? (CJK strings cannot be the conversion result of non-CJK strings)
> 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).
The patch is updated and will be posted in a new email soon. The effect of the
patch is minimized. Please review the effect of the new patch.
> With all due respect,
> Jan Ekström
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel