OSDN Git Service

* change mappings of U+00A5 and U+203E
authorNARUSE, Yui <naruse@users.sourceforge.jp>
Fri, 9 Dec 2005 12:18:40 +0000 (12:18 +0000)
committerNARUSE, Yui <naruse@users.sourceforge.jp>
Fri, 9 Dec 2005 12:18:40 +0000 (12:18 +0000)
nkf.c
utf8tbl.c

diff --git a/nkf.c b/nkf.c
index aff9252..e1a3cd5 100644 (file)
--- a/nkf.c
+++ b/nkf.c
@@ -39,9 +39,9 @@
 **        E-Mail: furukawa@tcp-ip.or.jp
 **    \e$B$^$G8fO"Mm$r$*4j$$$7$^$9!#\e(B
 ***********************************************************************/
-/* $Id: nkf.c,v 1.85 2005/11/30 09:15:06 naruse Exp $ */
+/* $Id: nkf.c,v 1.86 2005/12/09 03:18:40 naruse Exp $ */
 #define NKF_VERSION "2.0.5"
-#define NKF_RELEASE_DATE "2005-11-27"
+#define NKF_RELEASE_DATE "2005-12-08"
 #include "config.h"
 
 #define COPY_RIGHT \
@@ -2963,10 +2963,17 @@ unicode_to_jis_common(c2, c1, c0, p2, p1)
     if(c2 < 0xe0){
        if (ms_ucs_map_f && cp51932_f){
            /* CP932/CP51932: U+00A6 (BROKEN BAR) -> not 0x8fa2c3, but 0x7c */
-           if(c2 == 0xC2 && c1 == 0xA6){
-               if (p2) *p2 = 0;
-               if (p1) *p1 = 0x7C;
-               return 0;
+           if(c2 == 0xC2){
+               switch(c1){
+               case 0xA5:
+                   if (p2) *p2 = 0;
+                   if (p1) *p1 = 0x5C;
+                   return 0;
+               case 0xA6:
+                   if (p2) *p2 = 0;
+                   if (p1) *p1 = 0x7C;
+                   return 0;
+               }
            }
        }else if(strict_mapping_f){
            switch(c2){
@@ -5392,10 +5399,10 @@ usage()
     fprintf(stderr,"I        Convert non ISO-2022-JP charactor to GETA\n");
     fprintf(stderr,"-L[uwm]  line mode u:LF w:CRLF m:CR (DEFAULT noconversion)\n");
     fprintf(stderr,"long name options\n");
+    fprintf(stderr," --ic=<input codeset> --oc=<output codeset>         set the input or output codeset\n");
     fprintf(stderr," --fj,--unix,--mac,--windows                        convert for the system\n");
     fprintf(stderr," --jis,--euc,--sjis,--utf8,--utf16,--mime,--base64  convert for the code\n");
     fprintf(stderr," --hiragana, --katakana    Hiragana/Katakana Conversion\n");
-    fprintf(stderr," --x0212                   Convert JISX0212\n");
     fprintf(stderr," --prefix=    Insert escape before troublesome characters of Shift_JIS\n");
 #ifdef INPUT_OPTION
     fprintf(stderr," --cap-input, --url-input  Convert hex after ':' or '%%'\n");
@@ -5403,9 +5410,6 @@ usage()
 #ifdef NUMCHAR_OPTION
     fprintf(stderr," --numchar-input   Convert Unicode Character Reference\n");
 #endif
-#ifdef UNICODE_NORMALIZATION
-    fprintf(stderr," --utf8mac-input   UTF-8-MAC input\n");
-#endif
 #ifdef UTF8_INPUT_ENABLE
     fprintf(stderr," --fb-{skip, html, xml, perl, java, subchar}\n");
     fprintf(stderr,"                   set the way nkf handles unassigned characters\n");
index 57f707d..02c3dbf 100644 (file)
--- a/utf8tbl.c
+++ b/utf8tbl.c
@@ -11,7 +11,7 @@ const unsigned short euc_to_utf8_A1[] = {
  0xFF5B, 0xFF5D, 0x3008, 0x3009, 0x300A, 0x300B, 0x300C, 0x300D,
  0x300E, 0x300F, 0x3010, 0x3011, 0xFF0B, 0x2212, 0x00B1, 0x00D7,
  0x00F7, 0xFF1D, 0x2260, 0xFF1C, 0xFF1E, 0x2266, 0x2267, 0x221E,
- 0x2234, 0x2642, 0x2640, 0x00B0, 0x2032, 0x2033, 0x2103, 0xFFE5,
+ 0x2234, 0x2642, 0x2640, 0x00B0, 0x2032, 0x2033, 0x2103, 0x00A5,
  0xFF04, 0x00A2, 0x00A3, 0xFF05, 0xFF03, 0xFF06, 0xFF0A, 0xFF20,
  0x00A7, 0x2606, 0x2605, 0x25CB, 0x25CF, 0x25CE, 0x25C7,
 };
@@ -2382,7 +2382,7 @@ const unsigned short utf8_to_euc_C2[] = {
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
-      0, 0xA242, 0x2171, 0x2172, 0xA270,   0x5C, 0xA243, 0x2178,
+      0, 0xA242, 0x2171, 0x2172, 0xA270, 0x216F, 0xA243, 0x2178,
  0x212F, 0xA26D, 0xA26C, 0x2263, 0x224C,   0x2D, 0xA26E, 0xA234,
  0x216B, 0x215E,   0x32,   0x33, 0x212D, 0x264C, 0x2279, 0x2126,
  0xA231,   0x31, 0xA26B, 0x2264,      0,      0,      0, 0xA244,
@@ -2485,7 +2485,7 @@ const unsigned short utf8_to_euc_E280[] = {
  0x2277, 0x2278,      0,      0,      0, 0x2145, 0x2144,      0,
       0,      0,      0,      0,      0,      0,      0,      0,
  0x2273,      0, 0x216C, 0x216D,      0,      0,      0,      0,
-      0,      0,      0, 0x2228,      0,      0,   0x7E,      0,
+      0,      0,      0, 0x2228,      0,      0, 0x2131,      0,
 };
 const unsigned short utf8_to_euc_E284[] = {
       0,      0,      0, 0x216E,      0,      0,      0,      0,