Source

sphinx-unicode-argv / sphinx-unicode-argv

Full commit
diff -r e8018769bc59 sphinx-autogen.py
--- a/sphinx-autogen.py	Sat Dec 11 09:25:59 2010 +0100
+++ b/sphinx-autogen.py	Wed Dec 15 00:30:14 2010 +0200
@@ -9,7 +9,10 @@
 """
 
 import sys
+import locale
 
 if __name__ == '__main__':
     from sphinx.ext.autosummary.generate import main
-    sys.exit(main(sys.argv))
+    locale.setlocale(locale.LC_ALL, '')
+    argv = [arg.decode(locale.getpreferredencoding()) for arg in sys.argv]
+    sys.exit(main(argv))
diff -r e8018769bc59 sphinx-build.py
--- a/sphinx-build.py	Sat Dec 11 09:25:59 2010 +0100
+++ b/sphinx-build.py	Wed Dec 15 00:30:14 2010 +0200
@@ -9,7 +9,10 @@
 """
 
 import sys
+import locale
 
 if __name__ == '__main__':
     from sphinx import main
-    sys.exit(main(sys.argv))
+    locale.setlocale(locale.LC_ALL, '')
+    argv = [arg.decode(locale.getpreferredencoding()) for arg in sys.argv]
+    sys.exit(main(argv))
diff -r e8018769bc59 sphinx-quickstart.py
--- a/sphinx-quickstart.py	Sat Dec 11 09:25:59 2010 +0100
+++ b/sphinx-quickstart.py	Wed Dec 15 00:30:14 2010 +0200
@@ -9,7 +9,10 @@
 """
 
 import sys
+import locale
 
 if __name__ == '__main__':
     from sphinx.quickstart import main
-    sys.exit(main(sys.argv))
+    locale.setlocale(locale.LC_ALL, '')
+    argv = [arg.decode(locale.getpreferredencoding()) for arg in sys.argv]
+    sys.exit(main(argv))