Oops fixed bug in guessing Shift_JIS -- flipped if condition!
authorsrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Thu, 14 Feb 2008 19:41:33 +0000 (19:41 +0000)
committersrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Thu, 14 Feb 2008 19:41:33 +0000 (19:41 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@187 59b500cc-1b3d-0410-9834-0bbf25fbcc57

core/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java

index 8db7ca3..f271ac3 100644 (file)
@@ -217,11 +217,11 @@ final class DecodedBitStreamParser {
         int nextValue = bytes[i + 1] & 0xFF;
         if ((value & 0x1) == 0) {
           // if even,
-          if (nextValue >= 0x40 && nextValue <= 0x9E) {
+          if (nextValue >= 0x9F && nextValue <= 0x7C) {
             return SHIFT_JIS;
           }
         } else {
-          if (nextValue >= 0x9F && nextValue <= 0x7C) {
+          if (nextValue >= 0x40 && nextValue <= 0x9E) {
             return SHIFT_JIS;
           }
         }