From b74d7778bfa1da3f81b8ea5ce1a0f58aa8e83746 Mon Sep 17 00:00:00 2001 From: yugui Date: Tue, 11 Nov 2008 11:00:39 +0000 Subject: merges r20145 from trunk into ruby_1_9_1. * ext/curses/curses.c: curses encoding should obey locale. * ext/curses/curses.c (curses_getch): 1.9 getch should return one character string for single byte string. wchar_t support may follow in the future. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'string.c') diff --git a/string.c b/string.c index 08f3cdbf5..3dd86c911 100644 --- a/string.c +++ b/string.c @@ -570,6 +570,12 @@ rb_str_export(VALUE str) return rb_str_conv_enc(str, STR_ENC_GET(str), rb_default_external_encoding()); } +VALUE +rb_str_export_locale(VALUE str) +{ + return rb_str_conv_enc(str, STR_ENC_GET(str), rb_locale_encoding()); +} + VALUE rb_str_export_to_enc(VALUE str, rb_encoding *enc) { -- cgit