summaryrefslogtreecommitdiff
path: root/Build/source/texk
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
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')
-rw-r--r--Build/source/texk/kpathsea/knj.c22
-rw-r--r--Build/source/texk/kpathsea/progname.c6
2 files changed, 24 insertions, 4 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);
+ }
}
diff --git a/Build/source/texk/kpathsea/progname.c b/Build/source/texk/kpathsea/progname.c
index dd65d5247d7..9e6a91b219d 100644
--- a/Build/source/texk/kpathsea/progname.c
+++ b/Build/source/texk/kpathsea/progname.c
@@ -501,8 +501,10 @@ kpathsea_set_program_name (kpathsea kpse, const_string argv0,
}
#if defined(WIN32)
- cp = GetACP();
- is_cp932_system = (cp == 932 || cp == 936 || cp == 950);
+ cp = GetOEMCP();
+ if (cp == 932 || cp == 936 || cp == 950) {
+ is_cp932_system = cp;
+ }
#if defined(__MINGW32__)
/* Set various info about user. Among many things,