зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
99a24e9e15
Коммит
7c1cab2a4f
|
@ -1,3 +1,10 @@
|
||||||
|
Sun Dec 30 06:31:11 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
Sun Dec 30 06:27:38 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
Sun Dec 30 06:27:38 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* lib/mkmf.rb (depend_rules): need to convert `/' to `\' for windows
|
* lib/mkmf.rb (depend_rules): need to convert `/' to `\' for windows
|
||||||
|
|
|
@ -1011,6 +1011,9 @@ Init_Encoding(void)
|
||||||
/* dummy for unsupported, statefull encoding */
|
/* dummy for unsupported, statefull encoding */
|
||||||
rb_define_dummy_encoding("ISO-2022-JP");
|
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) {
|
for (i = 0; i < enc_table_size; ++i) {
|
||||||
rb_encoding *enc = enc_table[i].enc;
|
rb_encoding *enc = enc_table[i].enc;
|
||||||
if (enc) set_encoding_const(rb_enc_name(enc), enc);
|
if (enc) set_encoding_const(rb_enc_name(enc), enc);
|
||||||
|
|
3
ruby.c
3
ruby.c
|
@ -712,7 +712,8 @@ proc_options(int argc, char **argv, struct cmdline_options *opt)
|
||||||
enc = ONIG_ENCODING_EUC_JP;
|
enc = ONIG_ENCODING_EUC_JP;
|
||||||
break;
|
break;
|
||||||
case 'S': case 's':
|
case 'S': case 's':
|
||||||
enc = ONIG_ENCODING_SJIS;
|
enc = rb_enc_find("Windows-31J");
|
||||||
|
if (!enc) enc = ONIG_ENCODING_SJIS;
|
||||||
break;
|
break;
|
||||||
case 'U': case 'u':
|
case 'U': case 'u':
|
||||||
enc = ONIG_ENCODING_UTF8;
|
enc = ONIG_ENCODING_UTF8;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче