OSDN Git Service
(root)
/
jnethack
/
source.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfad439
)
add utf-8 source detection
author
SHIRAKATA Kentaro
<argrath@ub32.org>
Thu, 2 Sep 2021 08:22:11 +0000
(17:22 +0900)
committer
SHIRAKATA Kentaro
<argrath@ub32.org>
Sat, 9 Oct 2021 20:28:04 +0000
(
05:28
+0900)
japanese/jlib.c
patch
|
blob
|
history
diff --git
a/japanese/jlib.c
b/japanese/jlib.c
index
0777da2
..
c6977be
100644
(file)
--- a/
japanese/jlib.c
+++ b/
japanese/jlib.c
@@
-34,7
+34,8
@@
static const char* ccode_alt[]={
/* internal kcode */
/* IC=0 EUC */
/* IC=1 SJIS */
-#define IC ((unsigned char)("
\8a
¿"[0])==0x8a)
+/* IC=2 UTF8 */
+#define IC ((((unsigned char)("
\8a
¿"[0])==0xe6) ? 2 : ((unsigned char)("
\8a
¿"[0])==0x8a)))
/* default input kcode */
#ifndef INPUT_KCODE