[FFmpeg-devel] [PATCH 2/2] configure: instruct MSVC 2015 to properly process UTF-8 string literals
protogonoi at gmail.com
Sun Feb 5 10:08:10 EET 2017
On 4 February 2017 at 21:23, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> On Sat, Feb 4, 2017 at 10:29 AM, Carl Eugen Hoyos <ceffmpeg at gmail.com>
> > 2017-02-04 10:25 GMT+01:00 Hendrik Leppkes <h.leppkes at gmail.com>:
> >> Another MSVC workaround is an undocumented compiler pragma, which
> >> works in 2013, but not in 2012 (#pragma
> >> execution_character_set("utf-8")), but adding pragmas to files is also
> >> not something you can just easily hide away without it becoming ugly.
> > Is there a real disadvantage adding the pragma after your patch
> > gets applied?
> Adding pragmas is ugly because you can't hide them away, but its
> independent of this patch either way, since it targets a different
> compiler version.
> Applied this patch in the meantime, as well as 1/2 from the set.
Well given that the pragma doesn't work in 2012 and we are still claiming
support for those older msvc versions then it wouldn't really be a suitable
As far as I see it it the only way to cover all currently supported msvc
versions would be to convert the utf chars directly to binary. Which is a
bit ugly granted, but im not sure there is anyway around it. MSVC appears
to output a warning about characters that dont fit in the current code page
and at the moment only ccaption_dec.c is mentioned so it appears tat
luckily only 1 file needs to be changed.
More information about the ffmpeg-devel