Line 0
Link Here
|
|
|
1 |
--- display/TargetLabel.py.orig Sat Oct 25 02:15:56 2003 |
2 |
+++ display/TargetLabel.py Sat Oct 25 02:21:05 2003 |
3 |
@@ -76,7 +76,14 @@ |
4 |
|
5 |
# determine the locale |
6 |
import commands |
7 |
+import string |
8 |
fail, CHARMAP = commands.getstatusoutput("locale charmap") |
9 |
+if (fail or not CHARMAP): |
10 |
+ fail, CHARMAP = commands.getstatusoutput("echo $MM_CHARSET") |
11 |
+ if (fail or not CHARMAP): |
12 |
+ fail, CHARMAP = commands.getstatusoutput("echo $LANG") |
13 |
+ CHARMAP = CHARMAP[string.find(CHARMAP, ".")+1:len(CHARMAP)] |
14 |
+ |
15 |
if (fail or not CHARMAP): |
16 |
print "Could not detect character encoding." |
17 |
CHARMAP = "ASCII" |