diff --git a/AUTHORS b/AUTHORS
index ec208146c..8321b16db 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -38,6 +38,7 @@ Eric Kobrin (Velocitude)
evansepdx
Erik Barbara
Facundo Farias
+fakhri626
fics.danmark
Francois B. (Google)
Frank Yellin
diff --git a/android/res/values-fr/strings.xml b/android/res/values-fr/strings.xml
index 4d524a5b7..43f92072a 100644
--- a/android/res/values-fr/strings.xml
+++ b/android/res/values-fr/strings.xml
@@ -112,7 +112,7 @@
Améliore le balayage lors d\'une faible luminosité sur certains téléphone, mais peut causer un reflet. Ne fonctionne pas sur tous les téléphones.
Utiliser la lumière frontale
Paramètres généraux
- Stockez vos scans dans l'histoire
+ Stockez vos scans dans l\'histoire
Ajouter à Histoire
Balayer des codes-barres blancs sur fond noir. Non disponible sur certains appareils.
Balayage négatif
diff --git a/android/res/values-id/strings.xml b/android/res/values-id/strings.xml
index 5452b3fa4..f9d9f4a83 100644
--- a/android/res/values-id/strings.xml
+++ b/android/res/values-id/strings.xml
@@ -23,8 +23,8 @@
Cari Buku
Batal
Pencarian kustom
- Panggil nomor
- Kirim surel
+ Menghubungi nomor
+ Kirim email
Dapatkan petunjuk arah
Kirim MMS
OK
@@ -33,7 +33,7 @@
Cari isi
Aplikasi
Bookmark
- Bagikan melalui surel
+ Bagikan melalui email
Bagikan melalui SMS
Clipboard
Kontak
@@ -42,7 +42,7 @@
Pencarian web
Hubungkan ke Jaringan
Informasi kontak
- Alamat surel
+ Alamat email
Koordinat geografis
Nomor telepon
Alamat SMS
@@ -51,7 +51,7 @@
Hapus riwayat
Riwayat Barcode Scanner
Kosong
- Tidak ada scan barcode telah dicatat belum
+ Tidak ada pemindaian barcode yang pernah dicatat
Kirim riwayat
Riwayat
Gunakan MECARD
@@ -61,8 +61,8 @@
Pengaturan
Bagikan
Bulk mode: barcode sudah dipindai dan disimpan
- Maaf, kamera pada Android mengalami masalah. Anda mungkin perlu me-restart perangkat.
- Bentuk
+ Maaf, kamera mengalami masalah. Anda mungkin perlu me-restart perangkat.
+ Format
Metadata
Hai
Letakkan barcode di dalam kotak jendela untuk memindai.
@@ -100,42 +100,42 @@
Data Matriks
PDF417 (β)
QR Codes
- Perangkat Bug Workarounds
- Tidak ada modus barcode scene
- Gunakan hanya modus fokus standar
- Tidak ada fokus terus menerus
- Eksposur ada
- Metering ada
+ Device Bug Workarounds
+ Tidak ada modus tempat kejadian barcode
+ Hanya gunakan mode fokus standar
+ Jangan gunakan fokus terus menerus
+ Tanpa eksposur
+ Tanpa pengukuran
Otomatis
Non-aktif
Aktif
- Meningkatkan scanning dalam cahaya rendah pada beberapa ponsel, namun dapat menyebabkan silau. Tidak bekerja pada semua ponsel.
+ Meningkatkan pemindaian dalam cahaya rendah pada beberapa ponsel, namun dapat menyebabkan silau. Tidak dapat bekerja pada semua ponsel.
Gunakan lampu depan
Pengaturan umum
- Simpan scan Anda dalam Sejarah
- Tambahkan ke Sejarah
+ Simpan hasil pemindaian Anda dalam riwayat
+ Tambahkan ke riwayat
Memindai barcode putih pada latar belakang hitam. Tidak tersedia pada beberapa perangkat.
- Balikkan memindai
+ Membalikkan pemindaian
Pengaturan
- Tidak ada rotasi otomatis
- Beep
+ Jangan rotasi otomatis
+ Bunyi
Simpan beberapa pindaian dari barcode yang sama di dalam Riwayat
Ingat duplikasi
Hasil pengaturan
Ketika memindai barcode, decode\u2026
- Pencarian negara
+ Pilih negara
Mencoba mendapatkan beberapa informasi mengenai isi barcode
Ambil informasi lebih lanjut
Bergetar
Informasi kontak ditemukan
Kalendar acara ditemukan
- Alamat surel ditemukan
+ Alamat email ditemukan
Koordinat geografis ditemukan
Buku ditemukan
Produk ditemukan
Alamat SMS ditemukan
Nomor telepon ditemukan
- Teks biasa ditemukan
+ Teks ditemukan
URL ditemukan
Konfigurasi WLAN ditemukan
Pencarian Google Book
diff --git a/android/src/com/google/zxing/client/android/CaptureActivity.java b/android/src/com/google/zxing/client/android/CaptureActivity.java
index d4fe7dbc6..09e735c91 100755
--- a/android/src/com/google/zxing/client/android/CaptureActivity.java
+++ b/android/src/com/google/zxing/client/android/CaptureActivity.java
@@ -198,6 +198,8 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
&& (intent == null || intent.getBooleanExtra(Intents.Scan.SAVE_HISTORY, true));
source = IntentSource.NONE;
+ sourceUrl = null;
+ scanFromWebPageManager = null;
decodeFormats = null;
characterSet = null;
@@ -681,6 +683,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
if (scanFromWebPageManager != null && scanFromWebPageManager.isScanFromWebPage()) {
String replyURL = scanFromWebPageManager.buildReplyURL(rawResult, resultHandler);
+ scanFromWebPageManager = null;
sendReplyMessage(R.id.launch_product_query, replyURL, resultDurationMS);
}
diff --git a/android/src/com/google/zxing/client/android/camera/open/OpenCameraInterface.java b/android/src/com/google/zxing/client/android/camera/open/OpenCameraInterface.java
index b383300cc..1f53bdbc2 100644
--- a/android/src/com/google/zxing/client/android/camera/open/OpenCameraInterface.java
+++ b/android/src/com/google/zxing/client/android/camera/open/OpenCameraInterface.java
@@ -26,7 +26,7 @@ public final class OpenCameraInterface {
private OpenCameraInterface() {
}
- /** For {@link #open(int), means no preference for which camera to open. */
+ /** For {@link #open(int)}, means no preference for which camera to open. */
public static final int NO_REQUESTED_CAMERA = -1;
/**
diff --git a/core/src/main/java/com/google/zxing/datamatrix/encoder/X12Encoder.java b/core/src/main/java/com/google/zxing/datamatrix/encoder/X12Encoder.java
index fca29f250..0184bec49 100644
--- a/core/src/main/java/com/google/zxing/datamatrix/encoder/X12Encoder.java
+++ b/core/src/main/java/com/google/zxing/datamatrix/encoder/X12Encoder.java
@@ -72,16 +72,12 @@ final class X12Encoder extends C40Encoder {
context.updateSymbolInfo();
int available = context.getSymbolInfo().getDataCapacity() - context.getCodewordCount();
int count = buffer.length();
- if (count == 2) {
+ context.pos -= count;
+ if (context.getRemainingCharacters() > 1 || available > 1 ||
+ context.getRemainingCharacters() != available) {
context.writeCodeword(HighLevelEncoder.X12_UNLATCH);
- context.pos -= 2;
- context.signalEncoderChange(HighLevelEncoder.ASCII_ENCODATION);
- } else if (count == 1) {
- context.pos--;
- if (available > 1) {
- context.writeCodeword(HighLevelEncoder.X12_UNLATCH);
- }
- //NOP - No unlatch necessary
+ }
+ if (context.getNewEncoding() < 0) {
context.signalEncoderChange(HighLevelEncoder.ASCII_ENCODATION);
}
}
diff --git a/core/src/test/java/com/google/zxing/datamatrix/encoder/HighLevelEncodeTestCase.java b/core/src/test/java/com/google/zxing/datamatrix/encoder/HighLevelEncodeTestCase.java
index 1394c8963..15235ff1b 100644
--- a/core/src/test/java/com/google/zxing/datamatrix/encoder/HighLevelEncodeTestCase.java
+++ b/core/src/test/java/com/google/zxing/datamatrix/encoder/HighLevelEncodeTestCase.java
@@ -16,8 +16,11 @@
package com.google.zxing.datamatrix.encoder;
+import java.nio.charset.StandardCharsets;
+
import junit.framework.ComparisonFailure;
import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -316,6 +319,18 @@ public final class HighLevelEncodeTestCase extends Assert {
assertEquals("240 13 33 88 181 64 78 124 59 105 105 105", visualized);
}
+ @Test
+ public void testX12Unlatch() {
+ String visualized = encodeHighLevel("*DTCP01");
+ assertEquals("238 9 10 104 141 254 50 129", visualized);
+ }
+
+ @Test
+ public void testX12Unlatch2() {
+ String visualized = encodeHighLevel("*DTCP0");
+ assertEquals("238 9 10 104 141", visualized);
+ }
+
@Test
public void testBug3048549() {
//There was an IllegalArgumentException for an illegal character here because
@@ -334,14 +349,13 @@ public final class HighLevelEncodeTestCase extends Assert {
assertEquals("236 185 185 29 196 196 129 56", visualized);
}
- // Not passing?
- /*
+ @Ignore
@Test
public void testDataURL() {
byte[] data = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A,
0x7E, 0x7F, (byte) 0x80, (byte) 0x81, (byte) 0x82};
- String expected = encodeHighLevel(new String(data, StandardCharsets.ISO-8859-1)));
+ String expected = encodeHighLevel(new String(data, StandardCharsets.ISO_8859_1));
String visualized = encodeHighLevel("url(data:text/plain;charset=iso-8859-1,"
+ "%00%01%02%03%04%05%06%07%08%09%0A%7E%7F%80%81%82)");
assertEquals(expected, visualized);
@@ -350,7 +364,6 @@ public final class HighLevelEncodeTestCase extends Assert {
visualized = encodeHighLevel("url(data:;base64,flRlc3R+)");
assertEquals("127 85 102 116 117 127 129 56", visualized);
}
- */
private static String encodeHighLevel(String msg) {
CharSequence encoded = HighLevelEncoder.encodeHighLevel(msg);
diff --git a/javase/src/main/java/com/google/zxing/StringsResourceTranslator.java b/javase/src/main/java/com/google/zxing/StringsResourceTranslator.java
index e08ba227d..91ae520f3 100644
--- a/javase/src/main/java/com/google/zxing/StringsResourceTranslator.java
+++ b/javase/src/main/java/com/google/zxing/StringsResourceTranslator.java
@@ -118,7 +118,9 @@ public final class StringsResourceTranslator {
String parentName = translatedFile.getParent().getFileName().toString();
Matcher stringsFileNameMatcher = STRINGS_FILE_NAME_PATTERN.matcher(parentName);
- stringsFileNameMatcher.find();
+ if (!stringsFileNameMatcher.find()) {
+ throw new IllegalArgumentException("Invalid parent dir: " + parentName);
+ }
String language = stringsFileNameMatcher.group(1);
String massagedLanguage = LANGUAGE_CODE_MASSAGINGS.get(language);
if (massagedLanguage != null) {
@@ -151,6 +153,8 @@ public final class StringsResourceTranslator {
if (translatedString == null || forceRetranslation.contains(key)) {
anyChange = true;
translatedString = translateString(value, language);
+ // Specially for string resources, escape ' with \
+ translatedString = translatedString.replaceAll("'", "\\\\'");
}
out.write(translatedString);
@@ -193,10 +197,8 @@ public final class StringsResourceTranslator {
String translation = m.group(1);
// This is a little crude; unescape some common escapes in the raw response
- translation = translation.replaceAll(""", "\"");
- translation = translation.replaceAll("'", "'");
- translation = translation.replaceAll(""", "\"");
- translation = translation.replaceAll("'", "'");
+ translation = translation.replaceAll("&(amp;)?quot;", "\"");
+ translation = translation.replaceAll("&(amp;)?#39;", "'");
System.out.println(" Got translation " + translation);
return translation;
diff --git a/pom.xml b/pom.xml
index f4af341b8..aa9d8d64e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -99,25 +99,6 @@
3.1.1-SNAPSHOT
-
-
- central
- https://repo1.maven.org/maven2
-
- true
-
-
-
-
-
- central
- https://repo1.maven.org/maven2
-
- true
-
-
-
-
@@ -253,6 +234,28 @@
org.apache.maven.plugins
maven-jarsigner-plugin
1.3.2
+
+
+ signing
+
+ sign
+
+ package
+
+
+ target/*.apk
+
+ ../private/ZXing.keystore
+ zxing
+
+ -sigalg
+ MD5withRSA
+ -digestalg
+ SHA1
+
+
+
+
org.apache.maven.plugins
@@ -364,7 +367,7 @@
net.sf.proguard
proguard-base
- 5.0
+ 5.2
@@ -620,28 +623,6 @@
org.apache.maven.plugins
maven-jarsigner-plugin
-
-
- signing
-
- sign
-
- package
-
-
- target/*.apk
-
- ../private/ZXing.keystore
- zxing
-
- -sigalg
- MD5withRSA
- -digestalg
- SHA1
-
-
-
-
com.jayway.maven.plugins.android.generation2