Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
XXXX-XX-XX

* The Data Matrix encoder was fixed to always emit the Macro 05/06 codeword in the first position.
* The performance of the QR Code encoder was improved for data that mixes character classes, such as mixed-case text and URLs, by materialising each mode segment once when the mode changes rather than extending it character by character.


Expand Down
7 changes: 7 additions & 0 deletions src/datamatrix.ps.src
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,13 @@ begin
% Compensate c40headerlength if any
c40headerlength 0 gt { /c40headerlength c40headerlength 1 add def } if
} if
% Macro 05/06 is only recognised when its codeword is first
msg 0 get //datamatrix.m05 eq msg 0 get //datamatrix.m06 eq or {
Avals msg 0 get get addtocws
/i 1 def
% Compensate c40headerlength if any
c40headerlength 0 gt { /c40headerlength c40headerlength 1 add def } if
} if
{
i msglen ge {exit} if
//datamatrix.encfuncs mode get load exec
Expand Down
10 changes: 9 additions & 1 deletion tests/ps_tests/datamatrix.ps.test
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
} def


% Macro 05
% Macro 05/06

{
([\)>^03005^029214^030^004) (debugcws parse) datamatrix % Short 05
Expand All @@ -78,6 +78,14 @@
([\)>^03005^02921456^030^004) (debugcws parse) datamatrix % 05 with 6 in processed position 5
} [236 151 175 55 129] debugIsEqual

{
([\)>^03005^029AAAAAAA^030^004) (debugcws parse) datamatrix % 05 macro codeword must be first, so it precedes a C40 latch
} [236 230 89 191 89 191 254 66] debugIsEqual

{
([\)>^03006^029tttttttt^030^004) (debugcws parse) datamatrix % 06 ahead of a Text latch
} [237 239 211 138 211 138 211 105] debugIsEqual


% Metrics loops

Expand Down
Loading