fix(barcode): Use auto encoding for QR code generation to support all characters

This commit is contained in:
Nicolai Ort 2025-04-17 21:43:44 +02:00
parent b58bf700df
commit 4a76ee469b
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F

View File

@ -69,7 +69,11 @@ func (b *DefaultBarcodeService) GenerateBarcode(format string, content string, w
}
break
case "qr":
generatedCode, err = qr.Encode(content, qr.M, qr.AlphaNumeric)
// Always use qr.Auto encoding to support all characters in the content
encoding := qr.Auto
// QR code generation with error correction level M and auto encoding
generatedCode, err = qr.Encode(content, qr.M, encoding)
if err != nil {
return bytes.Buffer{}, err
}