DavBfr / dart_barcode

Barcode generation library
https://pub.dev/packages/barcode
Apache License 2.0
134 stars 39 forks source link

attempts to resolve: #43 #44

Closed gh-pap closed 2 years ago

gh-pap commented 2 years ago

What?

Attempts to resolve: #43

Why?

To allow barcode DataMatrix to support GS1 \<FNC1> char [232]

How?

Replaced 3 instances of utf8.encoder.convert(data) with the more basic Uint8List.fromList(data.codeUnits) and modified _encodeText to allow the pass-through of char [232]

Testing?

Run Barcode Demo (with DataMatrix selected) and enter è01093396871955653922001188è3103000540è8008220331124400

Decode the symbol using Barcode Data Decoder Verifier by IDAutomation.

Decoder output before the change (not GS1 compliant): è01093396871955653922001188è3103000540è8008220331124400

Decoder output after the change (GS1 compliant): \<FNC1>01093396871955653922001188\<GS>3103000540\<GS>8008220331124400

Concerns?

I'm worried removing the utf-8 conversion will break applications which utilise non-ascii character sets (but I don't know how to fix that)

DavBfr commented 2 years ago

Another version is merged.

gh-pap commented 2 years ago

Awesome! Thanks again for all your help with this. Dumb question: what's the relationship between your "another version is merged" and my pubspec.yaml? My pubspec currently has barcode: ^2.2.1 barcode_widget: ^2.0.2 barcode_image: ^2.0.1

DavBfr commented 2 years ago

I created a different fix for the same bug. And I incremented the version numbers. I'm publishing now.