freebsd-ports/deskutils/gdesklets/files/patch-display::TargetLabel.py
Joe Marcus Clarke 2dcea96d36 * Update to 0.25.1
* Change maintainer to Franz Klammer <klammer@webonaut.com>

PR:		60742
Submitted by:	Jeremy Messenger <mezz7@cox.net> (previous maintainer)
2003-12-30 22:34:22 +00:00

17 lines
606 B
Python

--- display/TargetLabel.py.orig Tue Dec 30 13:26:48 2003
+++ display/TargetLabel.py Tue Dec 30 13:27:20 2003
@@ -90,7 +90,14 @@
# determine the locale
import commands
+import string
fail, CHARMAP = commands.getstatusoutput("locale charmap")
+if (fail or not CHARMAP):
+ fail, CHARMAP = commands.getstatusoutput("echo $MM_CHARSET")
+ if (fail or not CHARMAP):
+ fail, CHARMAP = commands.getstatusoutput("echo $LANG")
+ CHARMAP = CHARMAP[string.find(CHARMAP, ".")+1:len(CHARMAP)]
+
if (fail or not CHARMAP):
print "Could not detect character encoding."
CHARMAP = "ASCII"