summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-29 21:34:15 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-29 21:34:15 +0000
commit7c1cab2a4f0322cfe37983ffb9ec620ad0b3002f (patch)
treeffa70d5f23c83f5f40db760bab79a5de19956cf4 /ruby.c
parent99a24e9e156c533f8b80353e9eaaf520baacf30b (diff)
* encoding.c (Init_encoding): register Windows-31J and its alias.
[ruby-dev:32843] * ruby.c (proc_options): -Ks options means Windows-31J, not Shift_JIS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index 701e3e5196..2e44c47fbd 100644
--- a/ruby.c
+++ b/ruby.c
@@ -712,7 +712,8 @@ proc_options(int argc, char **argv, struct cmdline_options *opt)
enc = ONIG_ENCODING_EUC_JP;
break;
case 'S': case 's':
- enc = ONIG_ENCODING_SJIS;
+ enc = rb_enc_find("Windows-31J");
+ if (!enc) enc = ONIG_ENCODING_SJIS;
break;
case 'U': case 'u':
enc = ONIG_ENCODING_UTF8;