summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 02:52:23 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 02:52:23 (GMT)
commit0530cf9ff88c13a69c95519139f75b87d097707c (patch)
tree34013f4a6bcb3b369f92fc26efb2af2c3ecccdaf /main.c
parent685cc0f7c4c85877ccbb2804bdbb15280b049445 (diff)
* encoding.c: include locale.h
(rb_locale_charmap): new method Encoding.locale_charmap for nl_langinfo(CODESET). * include/ruby/encoding.h (rb_locale_charmap): declared. * main.c (main): call setlocale with LC_CTYPE. * ruby.c (locale_encoding): use rb_locale_charmap. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.c b/main.c
index e9d1bad..691cfcd 100644
--- a/main.c
+++ b/main.c
@@ -12,6 +12,7 @@
#undef RUBY_EXPORT
#include "ruby/ruby.h"
+#include <locale.h>
RUBY_GLOBAL_SETUP
@@ -22,6 +23,7 @@ main(int argc, char **argv, char **envp)
extern void ruby_set_debug_option(const char *);
ruby_set_debug_option(getenv("RUBY_DEBUG"));
#endif
+ setlocale(LC_CTYPE, "");
ruby_sysinit(&argc, &argv);
{