mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/nkf/nkf-utf8/nkf.c: Update nkf 2010-04-28.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8517275f82
commit
9526ba4ef3
2 changed files with 14 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue May 4 03:37:54 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/nkf/nkf-utf8/nkf.c: Update nkf 2010-04-28.
|
||||
|
||||
Mon May 3 21:08:16 2010 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||
|
||||
* sample/README: update file list. [ruby-core:28981]
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* 3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#define NKF_VERSION "2.1.1"
|
||||
#define NKF_RELEASE_DATE "2010-04-14"
|
||||
#define NKF_RELEASE_DATE "2010-04-28"
|
||||
#define COPY_RIGHT \
|
||||
"Copyright (C) 1987, FUJITSU LTD. (I.Ichikawa).\n" \
|
||||
"Copyright (C) 1996-2010, The nkf Project."
|
||||
|
@ -223,6 +223,7 @@ struct {
|
|||
{"ISO-2022-JP-2004", ISO_2022_JP_2004},
|
||||
{"SHIFT_JIS", SHIFT_JIS},
|
||||
{"SJIS", SHIFT_JIS},
|
||||
{"MS_Kanji", SHIFT_JIS},
|
||||
{"PCK", SHIFT_JIS},
|
||||
{"WINDOWS-31J", WINDOWS_31J},
|
||||
{"CSWINDOWS31J", WINDOWS_31J},
|
||||
|
@ -901,7 +902,7 @@ usage(void)
|
|||
" Z[0-4] Default/0: Convert JISX0208 Alphabet to ASCII\n"
|
||||
" 1: Kankaku to one space 2: to two spaces 3: HTML Entity\n"
|
||||
" 4: JISX0208 Katakana to JISX0201 Katakana\n"
|
||||
" X,x Assume X0201 kana in MS-Kanji, -x preserves X0201\n"
|
||||
" X,x Convert Halfwidth Katakana to Fullwidth or preserve it\n"
|
||||
);
|
||||
fprintf(HELP_OUTPUT,
|
||||
" O Output to File (DEFAULT 'nkf.out')\n"
|
||||
|
@ -1208,10 +1209,10 @@ set_input_encoding(nkf_encoding *enc)
|
|||
case ISO_8859_1:
|
||||
iso8859_f = TRUE;
|
||||
break;
|
||||
case CP50220:
|
||||
case CP50221:
|
||||
case CP50222:
|
||||
if (x0201_f == NKF_UNSPECIFIED) x0201_f = FALSE; /* -x specified implicitly */
|
||||
case CP50220:
|
||||
#ifdef SHIFTJIS_CP932
|
||||
cp51932_f = TRUE;
|
||||
#endif
|
||||
|
@ -1264,6 +1265,7 @@ set_input_encoding(nkf_encoding *enc)
|
|||
#endif
|
||||
break;
|
||||
case EUCJP_MS:
|
||||
if (x0201_f == NKF_UNSPECIFIED) x0201_f = FALSE; /* -x specified implicitly */
|
||||
#ifdef SHIFTJIS_CP932
|
||||
cp51932_f = FALSE;
|
||||
#endif
|
||||
|
@ -1272,6 +1274,7 @@ set_input_encoding(nkf_encoding *enc)
|
|||
#endif
|
||||
break;
|
||||
case EUCJP_ASCII:
|
||||
if (x0201_f == NKF_UNSPECIFIED) x0201_f = FALSE; /* -x specified implicitly */
|
||||
#ifdef SHIFTJIS_CP932
|
||||
cp51932_f = FALSE;
|
||||
#endif
|
||||
|
@ -1326,7 +1329,6 @@ set_output_encoding(nkf_encoding *enc)
|
|||
{
|
||||
switch (nkf_enc_to_index(enc)) {
|
||||
case CP50220:
|
||||
if (x0201_f == NKF_UNSPECIFIED) x0201_f = FALSE; /* -x specified implicitly */
|
||||
#ifdef SHIFTJIS_CP932
|
||||
if (cp932inv_f == TRUE) cp932inv_f = FALSE;
|
||||
#endif
|
||||
|
@ -1402,12 +1404,14 @@ set_output_encoding(nkf_encoding *enc)
|
|||
#endif
|
||||
break;
|
||||
case EUCJP_MS:
|
||||
if (x0201_f == NKF_UNSPECIFIED) x0201_f = FALSE; /* -x specified implicitly */
|
||||
x0212_f = TRUE;
|
||||
#ifdef UTF8_OUTPUT_ENABLE
|
||||
ms_ucs_map_f = UCS_MAP_MS;
|
||||
#endif
|
||||
break;
|
||||
case EUCJP_ASCII:
|
||||
if (x0201_f == NKF_UNSPECIFIED) x0201_f = FALSE; /* -x specified implicitly */
|
||||
x0212_f = TRUE;
|
||||
#ifdef UTF8_OUTPUT_ENABLE
|
||||
ms_ucs_map_f = UCS_MAP_ASCII;
|
||||
|
|
Loading…
Reference in a new issue