mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* encoding.c (rb_locale_encoding): return US-ASCII when charmap is nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d407e2fac8
commit
0605d15f6a
4 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Mon Jan 14 18:06:37 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* encoding.c (rb_locale_encoding): return US-ASCII when charmap is
|
||||||
|
nil.
|
||||||
|
|
||||||
Mon Jan 14 16:12:58 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Mon Jan 14 16:12:58 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* lib/shellwords.rb: scape should be an alias to shellescape. a
|
* lib/shellwords.rb: scape should be an alias to shellescape. a
|
||||||
|
|
|
@ -138,5 +138,7 @@ OnigEncodingDefine(euc_kr, EUC_KR) = {
|
||||||
euckr_left_adjust_char_head,
|
euckr_left_adjust_char_head,
|
||||||
euckr_is_allowed_reverse_match
|
euckr_is_allowed_reverse_match
|
||||||
};
|
};
|
||||||
|
ENC_ALIAS("eucKR", "EUC-KR");
|
||||||
ENC_REPLICATE("EUC-CN", "EUC-KR");
|
ENC_REPLICATE("EUC-CN", "EUC-KR");
|
||||||
|
ENC_ALIAS("eucCN", "EUC-CN");
|
||||||
ENC_REPLICATE("CP949", "EUC-KR");
|
ENC_REPLICATE("CP949", "EUC-KR");
|
||||||
|
|
|
@ -138,3 +138,4 @@ OnigEncodingDefine(euc_tw, EUC_TW) = {
|
||||||
euctw_left_adjust_char_head,
|
euctw_left_adjust_char_head,
|
||||||
euctw_is_allowed_reverse_match
|
euctw_is_allowed_reverse_match
|
||||||
};
|
};
|
||||||
|
ENC_ALIAS("eucTW", "EUC-TW");
|
||||||
|
|
|
@ -874,9 +874,9 @@ rb_locale_encoding(void)
|
||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
if (NIL_P(charmap))
|
if (NIL_P(charmap))
|
||||||
return rb_ascii8bit_encoding();
|
idx = rb_enc_find_index("US-ASCII");
|
||||||
|
else
|
||||||
idx = rb_enc_find_index(StringValueCStr(charmap));
|
idx = rb_enc_find_index(StringValueCStr(charmap));
|
||||||
if (idx < 0)
|
if (idx < 0)
|
||||||
return rb_ascii8bit_encoding();
|
return rb_ascii8bit_encoding();
|
||||||
|
|
||||||
|
@ -1093,7 +1093,7 @@ Init_Encoding(void)
|
||||||
rb_define_dummy_encoding("ISO-2022-JP");
|
rb_define_dummy_encoding("ISO-2022-JP");
|
||||||
rb_enc_alias("ISO2022-JP", "ISO-2022-JP");
|
rb_enc_alias("ISO2022-JP", "ISO-2022-JP");
|
||||||
rb_define_dummy_encoding("ISO-2022-JP-2");
|
rb_define_dummy_encoding("ISO-2022-JP-2");
|
||||||
rb_enc_alias("ISO2022-JP-2", "ISO-2022-JP-2");
|
rb_enc_alias("ISO2022-JP2", "ISO-2022-JP-2");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* locale insensitive functions */
|
/* locale insensitive functions */
|
||||||
|
|
Loading…
Reference in a new issue