diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-29 21:34:15 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-29 21:34:15 +0000 |
commit | 7c1cab2a4f0322cfe37983ffb9ec620ad0b3002f (patch) | |
tree | ffa70d5f23c83f5f40db760bab79a5de19956cf4 /ruby.c | |
parent | 99a24e9e156c533f8b80353e9eaaf520baacf30b (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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |