From 3f0ec8887f3bc75a98fd3ec8926518b635c70b7b Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 18 Oct 2008 10:36:20 +0000 Subject: * string.c (rb_external_str_new): a new function to convert from external encoding to internal encoding. if something went wrong, it returns a string with the external encoding. * string.c (rb_external_str_new_with_enc): same as above besides you can specify the source encoding. * ruby.c (ruby_set_argv): use rb_external_str_new() * ruby.c (set_arg0, ruby_script): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/intern.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/ruby/intern.h') diff --git a/include/ruby/intern.h b/include/ruby/intern.h index d99c39636b..8e38217aac 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -546,6 +546,7 @@ VALUE rb_str_new5(VALUE, const char*, long); VALUE rb_tainted_str_new_cstr(const char*); 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_str_buf_new(long); VALUE rb_str_buf_new_cstr(const char*); VALUE rb_str_buf_new2(const char*); -- cgit v1.2.3