From c2881572b765a458f06fd02b8c3c06d65bc96214 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 16 Oct 2007 20:07:20 +0000 Subject: * encoding.c (rb_primary_encoding): added Encoding.primary_encoding. * parse.y (rb_parser_encoding): added. * ruby.c (proc_options): added -E and --encoding options. * ruby.c (process_options): set primary encoding from command line option if set, or source encoding. * include/ruby/encoding.h (rb_enc_from_encoding, rb_get_primary_encoding, rb_set_primary_encoding): prototypes. * include/ruby/node.h (rb_parser_encoding): prototype. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/encoding.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/ruby/encoding.h') diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index 6645a1e29..08371cc14 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -99,5 +99,8 @@ int rb_enc_tolower(int c, rb_encoding *enc); ID rb_intern3(const char*, long, rb_encoding*); int rb_enc_symname_p(const char*, rb_encoding*); int rb_enc_str_coderange(VALUE); +VALUE rb_enc_from_encoding(rb_encoding *enc); +VALUE rb_get_primary_encoding(void); +void rb_set_primary_encoding(VALUE encoding); #endif /* RUBY_ENCODING_H */ -- cgit