From ba67b96434253d9f0585d586f56af0b4c70764b0 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 8 Nov 2015 00:57:02 +0100 Subject: [PATCH] have a helpful warning message about how to fix wrong locale setup, fixes #382 --- borg/archiver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/borg/archiver.py b/borg/archiver.py index acb705ff6..88a423311 100644 --- a/borg/archiver.py +++ b/borg/archiver.py @@ -261,6 +261,8 @@ class Archiver: # be restrictive when restoring files, restore permissions later if sys.getfilesystemencoding() == 'ascii': logger.warning('Warning: File system encoding is "ascii", extracting non-ascii filenames will not be supported.') + if sys.platform.startswith(('linux', 'freebsd', 'netbsd', 'openbsd', 'darwin', )): + logger.warning('Hint: You likely need to fix your locale setup. E.g. install locales and use: LANG=en_US.UTF-8') repository = self.open_repository(args.archive) manifest, key = Manifest.load(repository) archive = Archive(repository, key, manifest, args.archive.archive,