summaryrefslogtreecommitdiff
path: root/src/chill.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/chill.cc')
-rw-r--r--src/chill.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/chill.cc b/src/chill.cc
index 9901fab..45d53f1 100644
--- a/src/chill.cc
+++ b/src/chill.cc
@@ -35,14 +35,15 @@ int main(int argc, char *argv[]) {
// Create PYTHON interpreter
/* Pass argv[0] to the Python interpreter */
- Py_SetProgramName(argv[0]);
-
- /* Initialize the Python interpreter. Required. */
- Py_Initialize();
+ wchar_t *program = Py_DecodeLocale(argv[0], NULL);
+ Py_SetProgramName(program);
/* Add a static module */
initchill();
+ /* Initialize the Python interpreter. Required. */
+ Py_Initialize();
+
if (argc == 2) {
FILE *f = fopen(argv[1], "r");
if (!f) {