From afbf93478e0a04a12d11dc8933eaa2a779353cb3 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 11 Nov 2009 18:17:49 -0800 Subject: * 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. --- ChangeLog | 6 ++++++ txr.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index dcbf23e0..1cc9198c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-11 Kaz Kylheku + + * 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. + 2009-11-11 Kaz Kylheku Big conversion to wide characters and UTF-8 support. diff --git a/txr.c b/txr.c index 6192014b..92593202 100644 --- a/txr.c +++ b/txr.c @@ -32,6 +32,7 @@ #include #include #include +#include #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); } -- cgit v1.2.3