aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/coding.c b/src/coding.c
index 366cf6647a7..fa079a749cb 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -2266,10 +2266,15 @@ detect_coding_sjis (src, src_end)
2266 while (1) 2266 while (1)
2267 { 2267 {
2268 ONE_MORE_BYTE (c); 2268 ONE_MORE_BYTE (c);
2269 if ((c >= 0x80 && c < 0xA0) || c >= 0xE0) 2269 if (c >= 0x81)
2270 { 2270 {
2271 ONE_MORE_BYTE (c); 2271 if (c <= 0x9F || (c >= 0xE0 && c <= 0xEF))
2272 if (c < 0x40) 2272 {
2273 ONE_MORE_BYTE (c);
2274 if (c < 0x40 || c == 0x7F || c > 0xFC)
2275 return 0;
2276 }
2277 else if (c > 0xDF)
2273 return 0; 2278 return 0;
2274 } 2279 }
2275 } 2280 }