diff --git a/compose/config/config.py b/compose/config/config.py index 21549e9b34..f664ec8d5d 100644 --- a/compose/config/config.py +++ b/compose/config/config.py @@ -501,7 +501,7 @@ def resolve_volume_path(volume, working_dir, service_name): if host_path.startswith('.'): host_path = expand_path(working_dir, host_path) host_path = os.path.expanduser(host_path) - return "{}:{}".format(host_path, container_path) + return u"{}:{}".format(host_path, container_path) else: return container_path diff --git a/tests/unit/config/config_test.py b/tests/unit/config/config_test.py index fc5e22bf2b..69b2358525 100644 --- a/tests/unit/config/config_test.py +++ b/tests/unit/config/config_test.py @@ -575,6 +575,11 @@ class VolumeConfigTest(unittest.TestCase): }, working_dir='.') self.assertEqual(d['volumes'], ['~:/data']) + def test_volume_path_with_non_ascii_directory(self): + volume = u'/Füü/data:/data' + container_path = config.resolve_volume_path(volume, ".", "test") + self.assertEqual(container_path, volume) + class MergePathMappingTest(object): def config_name(self):