Commits

Mikko Värri  committed 0a516de

Initial patch.

  • Participants
  • Parent commits ff12917

Comments (0)

Files changed (2)

+sphinx-unicode-argv
 # Placed by Bitbucket

File sphinx-unicode-argv

+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))