diff --git a/README.md b/README.md index 342fa7e..f51869b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ It will allow you to read and decode barcode images from Python. Use the Python 3 version of pip (usually invoked via `pip3`) to install: `pip3 install zxing` * You'll neeed to have a recent `java` binary somewhere in your path. (Tested with OpenJDK v7, v8, v11.) -* pip will automatically download the relevant [JAR](https://en.wikipedia.org/wiki/JAR_(file_format)) files for the Java ZXing libraries (currently v3.4.1) +* pip will automatically download the relevant [JAR](https://en.wikipedia.org/wiki/JAR_(file_format)) files for the Java ZXing libraries (currently v3.5.1) ## Usage @@ -22,7 +22,7 @@ The `BarCodeReader` class is used to decode images: >>> import zxing >>> reader = zxing.BarCodeReader() >>> print(reader.zxing_version, reader.zxing_version_info) -3.4.1 (3, 4, 1) +3.5.1 (3, 5, 1) >>> barcode = reader.decode("test/barcodes/QR_CODE-easy.png") >>> print(barcode) BarCode(raw='This should be QR_CODE', parsed='This should be QR_CODE', path='test/barcodes/QR_CODE-easy.png', format='QR_CODE', type='TEXT', points=[(15.0, 87.0), (15.0, 15.0), (87.0, 15.0), (75.0, 75.0)]) diff --git a/setup.py b/setup.py index 4039973..82e3e6f 100644 --- a/setup.py +++ b/setup.py @@ -23,9 +23,9 @@ def download_java_files(force=False): - files = {'java/javase.jar': 'https://repo1.maven.org/maven2/com/google/zxing/javase/3.4.1/javase-3.4.1.jar', - 'java/core.jar': 'https://repo1.maven.org/maven2/com/google/zxing/core/3.4.1/core-3.4.1.jar', - 'java/jcommander.jar': 'https://repo1.maven.org/maven2/com/beust/jcommander/1.78/jcommander-1.78.jar'} + files = {'java/javase.jar': 'https://repo1.maven.org/maven2/com/google/zxing/javase/3.5.1/javase-3.5.1.jar', + 'java/core.jar': 'https://repo1.maven.org/maven2/com/google/zxing/core/3.5.1/core-3.5.1.jar', + 'java/jcommander.jar': 'https://repo1.maven.org/maven2/com/beust/jcommander/1.82/jcommander-1.82.jar'} for fn, url in files.items(): p = path.join(path.dirname(__file__), 'zxing', fn) diff --git a/test/barcodes/AZTEC-utf8.png b/test/barcodes/AZTEC-utf8.png new file mode 100644 index 0000000..b72554e Binary files /dev/null and b/test/barcodes/AZTEC-utf8.png differ diff --git a/test/test_all.py b/test/test_all.py index 06d1b64..45ca26e 100644 --- a/test/test_all.py +++ b/test/test_all.py @@ -16,6 +16,7 @@ ('CODE_128-easy.jpg', 'CODE_128', 'This should be CODE_128'), ('PDF_417-easy.bmp', 'PDF_417', 'This should be PDF_417'), ('AZTEC-easy.jpg', 'AZTEC', 'This should be AZTEC'), + ('AZTEC-utf8.png', 'AZTEC', 'L’état, c’est moi'), ('QR CODE (¡filenáme törture test! 😉).png', 'QR_CODE', 'This should be QR_CODE'), ('QR_CODE-png-but-wrong-extension.bmp', 'QR_CODE', 'This should be QR_CODE'), ('QR_CODE-fun-with-whitespace.png', 'QR_CODE', '\n\r\t\r\r\r\n '),