OSDN Git Service
(root)
/
nkf
/
nkf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ce856e1
)
* in EUC-JP (default), don't convert most of U+00A1-U+00FF
author
NARUSE, Yui
<naruse@users.sourceforge.jp>
Tue, 8 Nov 2005 07:38:08 +0000
(07:38 +0000)
committer
NARUSE, Yui
<naruse@users.sourceforge.jp>
Tue, 8 Nov 2005 07:38:08 +0000
(07:38 +0000)
nkf.c
patch
|
blob
|
history
diff --git
a/nkf.c
b/nkf.c
index
cafb0c4
..
06ca191
100644
(file)
--- a/
nkf.c
+++ b/
nkf.c
@@
-39,7
+39,7
@@
** E-Mail: furukawa@tcp-ip.or.jp
**
\e
$B$^$G8fO"Mm$r$*4j$$$7$^$9!#
\e
(B
***********************************************************************/
** E-Mail: furukawa@tcp-ip.or.jp
**
\e
$B$^$G8fO"Mm$r$*4j$$$7$^$9!#
\e
(B
***********************************************************************/
-/* $Id: nkf.c,v 1.8
1 2005/11/06 20:17:01
naruse Exp $ */
+/* $Id: nkf.c,v 1.8
2 2005/11/07 22:38:08
naruse Exp $ */
#define NKF_VERSION "2.0.5"
#define NKF_RELEASE_DATE "2005-11-07"
#include "config.h"
#define NKF_VERSION "2.0.5"
#define NKF_RELEASE_DATE "2005-11-07"
#include "config.h"
@@
-2921,7
+2921,7
@@
w_iconv_common(c1, c0, pp, psize, p2, p1)
unsigned short val;
/* CP932/CP51932: U+00A6 (BROKEN BAR) -> not 0x8fa2c3, but 0x7c */
unsigned short val;
/* CP932/CP51932: U+00A6 (BROKEN BAR) -> not 0x8fa2c3, but 0x7c */
- if (cp51932_f && c1 == 0xC2 && c0 == 0xA6){
+ if (
ms_ucs_map_f &&
cp51932_f && c1 == 0xC2 && c0 == 0xA6){
if (p2) *p2 = 0;
if (p1) *p1 = 0x7C;
return 0;
if (p2) *p2 = 0;
if (p1) *p1 = 0x7C;
return 0;
@@
-2938,6
+2938,7
@@
w_iconv_common(c1, c0, pp, psize, p2, p1)
if (c0 < 0 || sizeof_utf8_to_euc_E5B8 <= c0) return 1;
val = p[c0];
if (val == 0) return 1;
if (c0 < 0 || sizeof_utf8_to_euc_E5B8 <= c0) return 1;
val = p[c0];
if (val == 0) return 1;
+ if (!ms_ucs_map_f && (val <= 0xFF || (c1 >= 0x40 && val & 0x8000))) return 1;
c2 = val >> 8;
if (val & 0x8000){
c2 = val >> 8;
if (val & 0x8000){