diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2009-11-11 18:17:49 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2009-11-11 18:17:49 -0800 |
commit | afbf93478e0a04a12d11dc8933eaa2a779353cb3 (patch) | |
tree | d1cd3b08bfaed8ff687d8092a33582422a0b9622 /txr.c | |
parent | d59d8950ec58702821ec618b92dfb2490ae0bf31 (diff) | |
download | txr-afbf93478e0a04a12d11dc8933eaa2a779353cb3.tar.gz txr-afbf93478e0a04a12d11dc8933eaa2a779353cb3.tar.bz2 txr-afbf93478e0a04a12d11dc8933eaa2a779353cb3.zip |
* txr.c (main): call setlocale to set the LC_CTYPE to en_US.UTF-8,
so that the C library streams do the encoding. Once the program
is weaned from C library wide character stream I/O, this can go away.
Diffstat (limited to 'txr.c')
-rw-r--r-- | txr.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -32,6 +32,7 @@ #include <dirent.h> #include <setjmp.h> #include <wchar.h> +#include <locale.h> #include "lib.h" #include "stream.h" #include "gc.h" @@ -142,6 +143,7 @@ int main(int argc, char **argv) obj_t *stack_bottom = nil; progname = argv[0] ? utf8_dup_from(argv[0]) : progname; init(progname, oom_realloc_handler, &stack_bottom); + setlocale(LC_CTYPE, "en_US.UTF-8"); return txr_main(argc, argv); } |