#11240: accented characters in FFREPORT variable create wrong log filename
-------------------------------------+-------------------------------------
             Reporter:  m.feriati    |                    Owner:  (none)
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  ffmpeg
              Version:  unspecified  |               Resolution:
             Keywords:  FFREPORT     |               Blocked By:
  accented                           |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Changes (by m.feriati):

 * component:  undetermined => ffmpeg


Old description:

> '''Summary of the bug'''
> this has been around for a long time, maybe years.
> on windows, if the filename set in FFREPORT environment variable contains
> accented characters, the resulting log won't match the expected filename,
> although the log contains the correct filename.
> {{{
> ffplay started on 2024-10-11 at 16:22:37
> Report written to "00 - hétérogénéisé.log"
> Log level: 40
> Command line:
> gyan-lay -hide_banner -noborder -i "00 -
> h\xe9t\xe9rog\xe9n\xe9is\xe9.mp4" -vf "scale=1280:-2,setsar=1"
> Initialized direct3d renderer.
> }}}
>
> also tried different console code pages with no success
> {{{
> chcp 1252
> chcp 65001 :: my default console code page
> chcp 437
> }}}
>
> expected behavior: produce {{{00 - hétérogénéisé.log}}}
> actual behavior: produces {{{00 - hétérogénéisé.log}}}
>
> '''hint'''
> the target name can be recovered by reading the log filename bytes in
> code page 1252 and then rewritten as utf8
>
> '''fyi'''
> this applies to all ffmpeg binaries.
>

> How to reproduce:
> {{{
> > set "FFREPORT=file=00 - hétérogénéisé.log:level=40"
> > ffplay -hide_banner -noborder -i "in\00 - hétérogénéisé.mp4" -vf
> scale=1280:-2,setsar=1
>
> >gyan-peg -version
> ffmpeg started on 2024-10-11 at 16:15:29
> Report written to "00 - hétérogénéisé.log"
> Log level: 40
> ffmpeg version 7.1-full_build-www.gyan.dev Copyright (c) 2000-2024 the
> FFmpeg developers
> }}}

New description:

 '''Summary of the bug'''
 this has been around for a long time, maybe years.
 on windows, if the filename set in FFREPORT environment variable contains
 accented characters, the resulting log won't match the expected filename,
 although the log contains the correct filename.
 {{{
 ffplay started on 2024-10-11 at 16:22:37
 Report written to "00 - hétérogénéisé.log"
 Log level: 40
 Command line:
 ffplay -hide_banner -noborder -i "00 - h\xe9t\xe9rog\xe9n\xe9is\xe9.mp4"
 -vf "scale=1280:-2,setsar=1"
 Initialized direct3d renderer.
 }}}

 also tried different console code pages with no success
 {{{
 chcp 1252
 chcp 65001 :: my default console code page
 chcp 437
 }}}

 expected behavior: produce {{{00 - hétérogénéisé.log}}}
 actual behavior: produces {{{00 - hétérogénéisé.log}}}

 '''hint'''
 the target name can be recovered by reading the log filename bytes in code
 page 1252 and then rewritten as utf8

 '''fyi'''
 this applies to all ffmpeg binaries.


 How to reproduce:
 {{{
 > set "FFREPORT=file=00 - hétérogénéisé.log:level=40"
 > ffplay -hide_banner -noborder -i "in\00 - hétérogénéisé.mp4" -vf
 scale=1280:-2,setsar=1

 >ffmpeg -version
 ffmpeg started on 2024-10-11 at 16:15:29
 Report written to "00 - hétérogénéisé.log"
 Log level: 40
 ffmpeg version 7.1-full_build-www.gyan.dev Copyright (c) 2000-2024 the
 FFmpeg developers
 }}}

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11240#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to