Skip to content

Commit

Permalink
[native/libc] Add comments about locales.
Browse files Browse the repository at this point in the history
Related to issue #912.
  • Loading branch information
Andy Chu committed Mar 22, 2021
1 parent 88e9505 commit ec3f79a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion native/libc.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,19 @@

#include <Python.h>

// Oil always uses UTF-8.
// Oil always uses UTF-8, so some calls override the locale.

// 'man setlocale' says that "C" aka "POSIX" is the only portable locale?

// Doesn't work on default Arch? See issue #912.
const char* kLocaleOverride = "C.UTF-8";

// mbstowcs() fails below
// const char* kLocaleOverride = "C";

// Doesn't work on default Debian
// const char* kLocaleOverride = "en_US.UTF-8";

// Log messages to stderr.
static void debug(const char* fmt, ...) {
#ifdef LIBC_VERBOSE
Expand Down

0 comments on commit ec3f79a

Please sign in to comment.