[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 18:13:13 CET 2014



Derek Buitenhuis <derek.buitenhuis at gmail.com> wrote:
>On 2/20/2014 4:33 PM, Anshul wrote:
>> 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.
>
>Currently, as it stands, colors are not written when redirected to a
>text
>file in any sane environment.
>

I was not talking about any terminal or cmd prompt but when we use 
Redirection in our core code like changing stdout fd  to some file fd

-
>I am with Jan on this one. It is a *bad* idea. We shouldn't hack around
>cmd.exe's
>legacy crap (that will never change btw, according to MS) by mucking
>with the encoding
>like this. It violates the principle of least astonishment[1] --
>everyone expects output
>to be unicode, including our own FATE scripts. Also, this would
>probably break output
>in the MSYS terminal, which handles unicode fine.
>
>More over, even for what this patch wants to do, it does it wrong. The


>correct way can
>would be to use _setmode() with _O_U8TEXT

+1 I agree
And would like more info(pointer to code )about it if possible.
:)

>https://web.archive.org/web/20130215014133/http://blogs.msdn.com/b/michkap/archive/2008/03/18/8306597.aspx
>
>(MS move his blog so I can't find the current page.)
>
>- Derek
>
>[1] http://en.wikipedia.org/wiki/Principle_of_least_astonishment


+1 agree but if there is an option specified by user than it wont be surprising, it would be grt to have both sollution.


>_______________________________________________
>ffmpeg-devel mailing list
>ffmpeg-devel at ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


More information about the ffmpeg-devel mailing list