ruby-changes:8326
From: matz <ko1@a...>
Date: Mon, 20 Oct 2008 16:15:37 +0900 (JST)
Subject: [ruby-changes:8326] Ruby:r19854 (trunk): * string.c (rb_locale_str_new): new function to convert string
matz 2008-10-20 16:15:19 +0900 (Mon, 20 Oct 2008) New Revision: 19854 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19854 Log: * string.c (rb_locale_str_new): new function to convert string from locale to internal encoding. Modified files: trunk/ChangeLog trunk/include/ruby/intern.h trunk/string.c Index: include/ruby/intern.h =================================================================== --- include/ruby/intern.h (revision 19853) +++ include/ruby/intern.h (revision 19854) @@ -547,6 +547,7 @@ VALUE rb_tainted_str_new(const char*, long); VALUE rb_tainted_str_new2(const char*); VALUE rb_external_str_new(const char*, long); +VALUE rb_locale_str_new(const char*, long); VALUE rb_str_buf_new(long); VALUE rb_str_buf_new_cstr(const char*); VALUE rb_str_buf_new2(const char*); Index: ChangeLog =================================================================== --- ChangeLog (revision 19853) +++ ChangeLog (revision 19854) @@ -1,3 +1,8 @@ +Mon Oct 20 15:42:02 2008 Yukihiro Matsumoto <matz@r...> + + * string.c (rb_locale_str_new): new function to convert string + from locale to internal encoding. + Mon Oct 20 09:47:13 2008 Tanaka Akira <akr@f...> * test/runner.rb: search srcdir/test/arg at first to find test/ruby Index: string.c =================================================================== --- string.c (revision 19853) +++ string.c (revision 19854) @@ -526,6 +526,12 @@ return rb_external_str_new_with_enc(ptr, len, rb_default_external_encoding()); } +VALUE +rb_locale_str_new(const char *ptr, long len) +{ + return rb_external_str_new_with_enc(ptr, len, rb_locale_encoding()); +} + static VALUE str_replace_shared(VALUE str2, VALUE str) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/