summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/knj.c
diff options
context:
space:
mode:
authorTakuji Tanaka <KXD02663@nifty.ne.jp>2013-07-06 07:55:13 +0000
committerTakuji Tanaka <KXD02663@nifty.ne.jp>2013-07-06 07:55:13 +0000
commit42e0b530018e1809e00aa4c88c7c092b2c53a157 (patch)
treecb6ab25b32c0f006a5b298827184993557d75090 /Build/source/texk/kpathsea/knj.c
parent0a0214a711c248af01ab3c8a7d294c72ccf6e2a3 (diff)
more CP936, CP950
git-svn-id: svn://tug.org/texlive/trunk@31113 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/knj.c')
-rw-r--r--Build/source/texk/kpathsea/knj.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/knj.c b/Build/source/texk/kpathsea/knj.c
index a4fcd3a6d91..bdf7d5cbf75 100644
--- a/Build/source/texk/kpathsea/knj.c
+++ b/Build/source/texk/kpathsea/knj.c
@@ -22,11 +22,29 @@ int is_cp932_system;
int isknj(int c)
{
c &= 0xff;
- return((c>=0x81 && c<=0x9f) || (c>=0xe0 && c<=0xfc));
+ switch (is_cp932_system) {
+ case 932:
+ return((c>=0x81 && c<=0x9f) || (c>=0xe0 && c<=0xfc));
+ case 936:
+ return(c>=0x81 && c<=0xfe);
+ case 950:
+ return((c>=0xa1 && c<=0xc6) || (c>=0xc9 && c<=0xf9));
+ default:
+ return(0);
+ }
}
int isknj2(int c)
{
c &= 0xff;
- return(c>=0x40 && c<=0xfc && c!=0x7f);
+ switch (is_cp932_system) {
+ case 932:
+ return(c>=0x40 && c<=0xfc && c!=0x7f);
+ case 936:
+ return(c>=0x40 && c<=0xfe && c!=0x7f);
+ case 950:
+ return((c>=0x40 && c<=0x7e) || (c>=0xa1 && c<=0xfe));
+ default:
+ return(0);
+ }
}