Skip to content

Commit

Permalink
Telepen: allow empty content, if user requests it
Browse files Browse the repository at this point in the history
  • Loading branch information
gredler committed May 10, 2024
1 parent 7ae051a commit f7e8180
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,10 @@ and data.

#### Okapi Barcode 0.4.6
- QR Code: allow FNC1 escape sequences in user-provided content
- QR Code: allow empty content, if user requests it
- Code 39 Extended: allow empty content, if user requests it
- QR Code: allow empty content, if user requests it
- UPC/EAN: allow empty content, if user requests it
- Telepen: allow empty content, if user requests it

#### Okapi Barcode 0.4.5
- Code 128: allow user to restrict the code sets used to encode data
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/uk/org/okapibarcode/backend/Telepen.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected void encode() {

private void normalMode() {

if (!content.matches("[\u0000-\u007F]+")) {
if (!content.matches("[\u0000-\u007F]*")) {
throw OkapiInputException.invalidCharactersInInput();
}

Expand Down Expand Up @@ -144,7 +144,7 @@ private void normalMode() {

private void numericMode() {

if (!content.matches("[0-9X]+")) {
if (!content.matches("[0-9X]*")) {
throw OkapiInputException.invalidCharactersInInput();
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
PROPERTIES

mode=NORMAL
emptyContentAllowed=true
content=

LOG

Check Digit: 0

CODEWORDS

1111111111331111111111111111331111111111
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
PROPERTIES

mode=NUMERIC
emptyContentAllowed=true
content=

LOG

Check Digit: 0

CODEWORDS

1111111111331111111111111111331111111111

0 comments on commit f7e8180

Please sign in to comment.