summaryrefslogtreecommitdiffstats
path: root/encoding.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
commit3a58cfef89bf73f121d03e2726b6c15b3d7cfe1c (patch)
treeffa70d5f23c83f5f40db760bab79a5de19956cf4 /encoding.c
parent757b27d07d18ac2f50ace6b1c7787bae704e326f (diff)
downloadruby-3a58cfef89bf73f121d03e2726b6c15b3d7cfe1c.tar.gz
ruby-3a58cfef89bf73f121d03e2726b6c15b3d7cfe1c.tar.xz
ruby-3a58cfef89bf73f121d03e2726b6c15b3d7cfe1c.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@14790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/encoding.c b/encoding.c
index ac47b9c15..969fd94be 100644
--- a/encoding.c
+++ b/encoding.c
@@ -1011,6 +1011,9 @@ Init_Encoding(void)
/* dummy for unsupported, statefull encoding */
rb_define_dummy_encoding("ISO-2022-JP");
+ rb_enc_replicate("Windows-31J", ONIG_ENCODING_SJIS);
+ rb_enc_alias("CP932", "Windows-31J");
+
for (i = 0; i < enc_table_size; ++i) {
rb_encoding *enc = enc_table[i].enc;
if (enc) set_encoding_const(rb_enc_name(enc), enc);