summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2011-04-17 10:11:11 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2011-04-17 10:11:11 +0800
commit59d97b03b96308dcd413a6740910b8084f0443a5 (patch)
treef63bfe64884e17e70e66aa788a83676d2abc7513
parent8920dfd48d17245994401d2a7c8ed5eba2bee5eb (diff)
downloadpttbbs-59d97b03b96308dcd413a6740910b8084f0443a5.tar
pttbbs-59d97b03b96308dcd413a6740910b8084f0443a5.tar.gz
pttbbs-59d97b03b96308dcd413a6740910b8084f0443a5.tar.bz2
pttbbs-59d97b03b96308dcd413a6740910b8084f0443a5.tar.lz
pttbbs-59d97b03b96308dcd413a6740910b8084f0443a5.tar.xz
pttbbs-59d97b03b96308dcd413a6740910b8084f0443a5.tar.zst
pttbbs-59d97b03b96308dcd413a6740910b8084f0443a5.zip
activate unsafe fix only in utf8 mode
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5337 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/include/convert.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/pttbbs/include/convert.h b/pttbbs/include/convert.h
index d1833b1c..f062069e 100644
--- a/pttbbs/include/convert.h
+++ b/pttbbs/include/convert.h
@@ -28,7 +28,8 @@ extern void set_converting_type(ConvertMode which);
// TODO make DBCS_BIG5 containing all "unsafe" properties
#ifndef FT_DBCS_BIG5
#define FT_DBCS_BIG5(c1, c2) { \
- if (b2u_ambiguous_width[((unsigned int)c1 << 8) | c2]) \
+ if (convert_mode == CONV_UTF8 && \
+ b2u_ambiguous_width[((unsigned int)c1 << 8) | c2]) \
return FTDBCS_UNSAFE; \
}
#endif