зеркало из https://github.com/github/ruby.git
* enc/trans/japanese.c (rb_from_Windows_31J, rb_to_Windows_31J):
provisional workaround for Windows-31J. [ruby-dev:33320] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
bbb7151467
Коммит
b2c5814afc
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Jan 23 22:14:28 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* enc/trans/japanese.c (rb_from_Windows_31J, rb_to_Windows_31J):
|
||||||
|
provisional workaround for Windows-31J. [ruby-dev:33320]
|
||||||
|
|
||||||
Wed Jan 23 15:25:04 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Jan 23 15:25:04 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* time.c (time_strftime): copy encoding from format. [ruby-dev:33303]
|
* time.c (time_strftime): copy encoding from format. [ruby-dev:33303]
|
||||||
|
|
|
@ -4427,6 +4427,11 @@ rb_from_SHIFT_JIS = {
|
||||||
"SHIFT_JIS", "UTF-8", &from_SHIFT_JIS, 3, 0,
|
"SHIFT_JIS", "UTF-8", &from_SHIFT_JIS, 3, 0,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
};
|
};
|
||||||
|
static const rb_transcoder
|
||||||
|
rb_from_Windows_31J = {
|
||||||
|
"Windows-31J", "UTF-8", &from_SHIFT_JIS, 3, 0,
|
||||||
|
NULL, NULL,
|
||||||
|
};
|
||||||
|
|
||||||
static const unsigned char
|
static const unsigned char
|
||||||
to_SHIFT_JIS_C2_offsets[64] = {
|
to_SHIFT_JIS_C2_offsets[64] = {
|
||||||
|
@ -13357,6 +13362,11 @@ rb_to_SHIFT_JIS = {
|
||||||
"UTF-8", "SHIFT_JIS", &to_SHIFT_JIS, 2, 1,
|
"UTF-8", "SHIFT_JIS", &to_SHIFT_JIS, 2, 1,
|
||||||
NULL, NULL,
|
NULL, NULL,
|
||||||
};
|
};
|
||||||
|
static const rb_transcoder
|
||||||
|
rb_to_Windows_31J = {
|
||||||
|
"UTF-8", "Windows_31J", &to_SHIFT_JIS, 2, 1,
|
||||||
|
NULL, NULL,
|
||||||
|
};
|
||||||
|
|
||||||
static const unsigned char
|
static const unsigned char
|
||||||
from_EUC_JP_8E_offsets[256] = {
|
from_EUC_JP_8E_offsets[256] = {
|
||||||
|
@ -23860,8 +23870,10 @@ void
|
||||||
Init_japanese(void)
|
Init_japanese(void)
|
||||||
{
|
{
|
||||||
rb_register_transcoder(&rb_from_SHIFT_JIS);
|
rb_register_transcoder(&rb_from_SHIFT_JIS);
|
||||||
|
rb_register_transcoder(&rb_from_Windows_31J);
|
||||||
rb_register_transcoder(&rb_from_EUC_JP);
|
rb_register_transcoder(&rb_from_EUC_JP);
|
||||||
rb_register_transcoder(&rb_to_SHIFT_JIS);
|
rb_register_transcoder(&rb_to_SHIFT_JIS);
|
||||||
|
rb_register_transcoder(&rb_to_Windows_31J);
|
||||||
rb_register_transcoder(&rb_to_EUC_JP);
|
rb_register_transcoder(&rb_to_EUC_JP);
|
||||||
rb_register_transcoder(&rb_from_ISO_2022_JP);
|
rb_register_transcoder(&rb_from_ISO_2022_JP);
|
||||||
rb_register_transcoder(&rb_to_ISO_2022_JP);
|
rb_register_transcoder(&rb_to_ISO_2022_JP);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче