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:
z:/Folder[äÜö]/fileName[���].avi
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":
#PY
ui = Gui();
adm = Avidemux();
inputFolder = "z:/Folder[äÜö]";
fileList = get_folder_content(inputFolder, "mp4");
if (fileList is None):
raise
for file in fileList:
ui.displayInfo("Info", "file: " + file);
if (0 == adm.loadVideo(file)):
raise
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 (https://github.com/mean00/avidemux2/commit/7a19b5feceed052ed8d9caea5064639f61282ca7) the issue, the latest VC++ nightly (191217 as of now) handles non-ASCII characters in get_folder_content() correctly according to my testing.