Skip to content

Commit

Permalink
Merge pull request #34 from bertabus/bertabus-patch-1
Browse files Browse the repository at this point in the history
fixed 'B' encoding for codabar
  • Loading branch information
boombuler authored Feb 3, 2018
2 parents 3cfea5a + 3320221 commit 5a7395f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions codabar/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ var encodingTable = map[rune][]bool{
':': []bool{true, true, false, true, false, true, true, false, true, true},
'/': []bool{true, true, false, true, true, false, true, false, true, true},
'.': []bool{true, true, false, true, true, false, true, true, false, true},
'+': []bool{true, false, true, true, false, false, true, true, false, false, true, true},
'+': []bool{true, false, true, true, false, true, true, false, true, true},
'A': []bool{true, false, true, true, false, false, true, false, false, true},
'B': []bool{true, false, true, false, false, true, false, false, true, true},
'C': []bool{true, false, false, true, false, false, true, false, true, true},
'B': []bool{true, false, false, true, false, false, true, false, true, true},
'C': []bool{true, false, true, false, false, true, false, false, true, true},
'D': []bool{true, false, true, false, false, true, true, false, false, true},
}

Expand Down
2 changes: 1 addition & 1 deletion codabar/encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ func Test_Encode(t *testing.T) {
}
}

testEncode("A40156B", "10110010010101101001010101001101010110010110101001010010101101010010011")
testEncode("A40156B", "10110010010101101001010101001101010110010110101001010010101101001001011")
}

0 comments on commit 5a7395f

Please sign in to comment.