diff --git a/ChangeLog b/ChangeLog index 382c39dae2..1b59768056 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jan 23 22:14:28 2008 Nobuyoshi Nakada + + * 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 * time.c (time_strftime): copy encoding from format. [ruby-dev:33303] diff --git a/enc/trans/japanese.c b/enc/trans/japanese.c index f4f28ddea2..e523ca7100 100644 --- a/enc/trans/japanese.c +++ b/enc/trans/japanese.c @@ -4427,6 +4427,11 @@ rb_from_SHIFT_JIS = { "SHIFT_JIS", "UTF-8", &from_SHIFT_JIS, 3, 0, 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 to_SHIFT_JIS_C2_offsets[64] = { @@ -13357,6 +13362,11 @@ rb_to_SHIFT_JIS = { "UTF-8", "SHIFT_JIS", &to_SHIFT_JIS, 2, 1, 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 from_EUC_JP_8E_offsets[256] = { @@ -23860,8 +23870,10 @@ void Init_japanese(void) { 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_to_SHIFT_JIS); + rb_register_transcoder(&rb_to_Windows_31J); rb_register_transcoder(&rb_to_EUC_JP); rb_register_transcoder(&rb_from_ISO_2022_JP); rb_register_transcoder(&rb_to_ISO_2022_JP);