diff --git a/components/lazbarcodes/src/lbc_maxicode.pas b/components/lazbarcodes/src/lbc_maxicode.pas index 39355970a..eaf2df035 100644 --- a/components/lazbarcodes/src/lbc_maxicode.pas +++ b/components/lazbarcodes/src/lbc_maxicode.pas @@ -2,8 +2,6 @@ Based on Zint (done by Robin Stuart and the Zint team) http://github.com/zint/zint - and Pascal adaption by TheUnknownOnes - http://theunknownones.net Refactoring: W. Pamler } @@ -245,7 +243,7 @@ begin _set[0] := 1; end; - for i := 1 to ALength-1 do + for i := 1 to ALength-1 do // Beginning with 1 is intentional here. begin if _set[i] = 0 then begin @@ -257,7 +255,7 @@ begin _char[i] := 13; _set[i] := 5; end else - if (i <> ALength -1) and (_set[i+1] = 5) then + if (i <> ALength - 1) and (_set[i+1] = 5) then begin _char[i] := 13; _set[i] := 5; diff --git a/components/lazbarcodes/src/ubarcodes.pas b/components/lazbarcodes/src/ubarcodes.pas index d5f56fdf3..30eb7f5ba 100644 --- a/components/lazbarcodes/src/ubarcodes.pas +++ b/components/lazbarcodes/src/ubarcodes.pas @@ -651,7 +651,7 @@ implementation {$R lazbarcodes_icons.res} uses - clipbrd, propedits, + lconvencoding, clipbrd, propedits, lbc_basic, lbc_helper, lbc_render, lbc_svg, lbc_code, lbc_code128, lbc_2of5, lbc_upcean, lbc_plessey, lbc_telepen, lbc_medical, lbc_postal, lbc_auspost, @@ -3386,7 +3386,7 @@ begin if FMode in [mcmAuto, mcmMode2, mcmMode3] then FSymbol^.SetPrimary(FPrimary); - Result := maxicode(FSymbol, FText); + Result := maxicode(FSymbol, UTF8ToISO_8859_1(FText)); end; procedure TBarcodeMaxiCode.RenderSymbol(xLeft, yTop, ASymbolWidth, ASymbolHeight,