Skip to content

Commit 63f38ec

Browse files
authored
Ensure that locale is set on startup. (#88)
1 parent 2bc3004 commit 63f38ec

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • {{ cookiecutter.format }}/{{ cookiecutter.class_name }}

{{ cookiecutter.format }}/{{ cookiecutter.class_name }}/main.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ int main(int argc, char *argv[]) {
7070
// Enforce UTF-8 encoding for stderr, stdout, file-system encoding and locale.
7171
// See https://docs.python.org/3/library/os.html#python-utf-8-mode.
7272
preconfig.utf8_mode = 1;
73+
// Ensure the locale is set (isolated interpreters won't by default)
74+
preconfig.configure_locale = 1;
7375
// Don't buffer stdio. We want output to appears in the log immediately
7476
config.buffered_stdio = 0;
7577
// Don't write bytecode; we can't modify the app bundle

0 commit comments

Comments
 (0)