February 27, 2021, 03:30:23 AM



get_folder_content bug in file name

Started by grmmx, December 11, 2019, 04:55:34 AM

Previous topic - Next topic


December 11, 2019, 04:55:34 AM Last Edit: December 11, 2019, 05:00:43 AM by grmmx
Avidemux v2.7.5 Release

The get_folder_content function has a character encoding bug when working with file names.

For example:

The folder "Folder[äÜö]" contains a file "fileName[äÜö].avi"

inputFolder = "z:/Folder[äÜö]";
fileList = get_folder_content(inputFolder, "avi");

In fileList:

All non-ASCII characters in a file names are replaced with "?". A path name remains normal.


With the latest VC++ nightly, I get umlauts in the folder name mangled while the filename is displayed correctly. VC++-only, MinGW builds are not affected.

All that with a .py file as input, the shell in Avidemux seems to be completely unable to pass non-ASCII characters to the script engine.


Avidemux v2.7.5 Release, Windows 10

Source code "loadVideo.py":
ui = Gui();
adm = Avidemux();
inputFolder = "z:/Folder[äÜö]";
fileList = get_folder_content(inputFolder, "mp4");
if (fileList is None):
for file in fileList:
ui.displayInfo("Info", "file: " + file);
if (0 == adm.loadVideo(file)):

The folder "Folder[äÜö]" contains a file "fileName[äÜö].mp4"

displayInfo displays a message:
"file: z:/Folder[äÜö]/fileName[���].mp4"

After that, "adm.loadVideo" throws a TinyPy:Exception.


We are very far past the 2.7.5 release in the development. The issue of character encoding mismatch has been confirmed, thank you for your report. It will be hopefully addressed in the future.

VC++ nightlies: https://avidemux.org/nightly/vsWin64/

MinGW nightlies: https://avidemux.org/nightly/win64/ (not affected by the bug)


The author of Avidemux has fixed the issue, the latest VC++ nightly (191217 as of now) handles non-ASCII characters in get_folder_content() correctly according to my testing.