summaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-12 23:03:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-12 23:03:17 +0000
commite3f9f0794c488635b1c3eef2ebb11f3360edadbb (patch)
treeb502133080e0b1534e7419f61ea1c9cf99718d2c /ruby.c
parent8af9b261dc1bee676b7a8979bd995fcfa0134baf (diff)
downloadruby-e3f9f0794c488635b1c3eef2ebb11f3360edadbb.tar.gz
ruby-e3f9f0794c488635b1c3eef2ebb11f3360edadbb.tar.xz
ruby-e3f9f0794c488635b1c3eef2ebb11f3360edadbb.zip
* ruby.c (proc_options): add -U command line option to specify
utf-8 as default_internal. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index 67b5a4fd3..0b4929d88 100644
--- a/ruby.c
+++ b/ruby.c
@@ -758,6 +758,10 @@ proc_options(int argc, char **argv, struct cmdline_options *opt)
if (!*++s) goto next_encoding;
goto encoding;
+ case 'U':
+ opt->intern.enc.name = rb_str_new2("utf-8");
+ break;
+
case 'K':
if (*++s) {
const char *enc_name = 0;