Opened 6 days ago
#11240 new defect
accented characters in FFREPORT variable create wrong log filename
Reported by: | m.feriati | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | FFREPORT accented |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
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