[FFmpeg-trac] #1951(undetermined:new): Ffmpeg meta data fails to write UTF-8 and screws up files

FFmpeg trac at avcodec.org
Thu Nov 22 22:43:46 CET 2012


#1951: Ffmpeg meta data fails to write UTF-8 and screws up files
-------------------------------------+-------------------------------------
             Reporter:  burzum       |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
              Version:  unspecified  |  undetermined
             Keywords:  win          |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by reimar):

 I'm fairly certain this is purely a PHP shell_exec issue, if you search
 around you will see that lots of people can't even get it to work on
 Linux.
 While it depends on implementation internals, I suspect that chcp does not
 have the slightest effect on what happens here, it should basically only
 affect things that operate on an actual terminal.
 Your output looks like your string gets converted by PHP to wchar/UCS-2
 (the format in which FFmpeg will receive the commandline) by just
 expanding each byte to two, instead of by doing proper conversion from
 UTF-8.
 For example this one mentions the "obvious" hack of using the native
 CreateProcessW, a function I am sure you will have a lot of "fun" with:
 http://stackoverflow.com/questions/9608583/pass-unicode-string-to-php-
 shell-exec-on-windows
 Personally I hold it with: Windows, or using anything beyond plain ASCII,
 pick at most one.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1951#comment:3>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list