summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/__main__.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/ranger/__main__.py b/ranger/__main__.py
index 887f8e28..f941299e 100644
--- a/ranger/__main__.py
+++ b/ranger/__main__.py
@@ -19,6 +19,7 @@
 import os
 import sys
 import ranger
+import locale
 
 from optparse import OptionParser, SUPPRESS_HELP
 from ranger.ext.openstruct import OpenStruct
@@ -153,14 +154,7 @@ def main():
 		print('ranger requires the python curses module. Aborting.')
 		sys.exit(1)
 
-	# Ensure that a utf8 locale is set.
-	if getdefaultlocale()[1] not in ('utf8', 'UTF-8'):
-		for locale in ('en_US.utf8', 'en_US.UTF-8'):
-			try: setlocale(LC_ALL, locale)
-			except: pass
-			else: break
-		else: setlocale(LC_ALL, '')
-	else: setlocale(LC_ALL, '')
+	locale.setlocale(locale.LC_ALL, '')
 
 	arg = parse_arguments()
 	ranger.arg = arg
pecs/ranger/commit/test/tc_directory.py?h=v1.1.1&id=5822dff7d91472bf2fc337c68f144e0ce1de09ae'>5822dff7 ^
9506fb8e ^

d88232a3 ^
fe179145 ^
9506fb8e ^
fe179145 ^
5822dff7 ^
fe179145 ^
9506fb8e ^
fe179145 ^

fae694a0 ^

fe179145 ^
fae694a0 ^

fe179145 ^
5822dff7 ^
9506fb8e ^
fae694a0 ^
9506fb8e ^
fae694a0 ^
fe179145 ^

fae694a0 ^
fe179145 ^
fae694a0 ^


4c05e43d ^

fae694a0 ^

fe179145 ^

fae694a0 ^




9506fb8e ^
fae694a0 ^
fae694a0 ^
1159f9ec ^



fe179145 ^
5822dff7 ^
9506fb8e ^
fae694a0 ^
fe179145 ^
fae694a0 ^
fe179145 ^

fae694a0 ^


fe179145 ^
fae694a0 ^
9506fb8e ^

f6f26231 ^
4c05e43d ^
f6f26231 ^







9506fb8e ^
fae694a0 ^

f6f26231 ^










4c05e43d ^

fae694a0 ^

fe179145 ^
5822dff7 ^

fe179145 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105