Duplicati Command Line and locale in Windows

I’m trying to run a backup job via a batch script on Windows, however I face the following problems:

  1. Folders which contain Greek characters are skipped unless I use chcp 65001 inside the .bat file

  2. Any errors that are thrown by Duplicati apparently are displayed using the system’s locale (Greek). For some reason however, when using chcp 65001 the error messages are mainly empty strings with some unintelligible characters here and there. Also using --force-locale option to set Duplicati’s locale to English doesn’t work.

If I don’t set the codepage to UTF-8 the error messages are displayed fine, but I need to set it to 65001 in order to feed the backup with folders containing foreign characters.

So the problem is I cannot use chcp 65001 and also be able to read any error messages at the same time. I can only do one of the two, and obviously I have to sacrifice the ability to comprehend error messages (if they are thrown).

Any way to solve this?

Which one? Things got better. See Windows Command-Line: Unicode and UTF-8 Output Text Buffer

Unreadable ouput in cli gave suggestions and got no response, so I don’t know which (if any) helped.

It’s Windows 10, fully updated.

Here are two screenshots showing the output of the .bat script (I deliberately changed the backend port to a closed one in the duplicati command in order to trigger this error message as an example):


The first one is while setting the codepage to UTF-8. This is essential so I can pass folders with greek characters to the backup job, but as you see I cannot read the error messages.

The second one is without setting the codepage. Error messages can be read fine and apparently use the system’s locale language, however the backup job will not work for folders with greek characters.

The only suggestion I see in the linked post that haven’t tried is using Windows Terminal… I’d prefer not to but if I don’t figure this out then I’ll give it a try.

PS. If –force-locale option was working then all this would have been solved