diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-21 02:52:23 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-21 02:52:23 +0000 |
commit | 0530cf9ff88c13a69c95519139f75b87d097707c (patch) | |
tree | 34013f4a6bcb3b369f92fc26efb2af2c3ecccdaf /main.c | |
parent | 685cc0f7c4c85877ccbb2804bdbb15280b049445 (diff) | |
download | ruby-0530cf9ff88c13a69c95519139f75b87d097707c.tar.gz |
* 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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); { |