diff --git a/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeGenerator.kt b/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeGenerator.kt index a98d45d..e291c99 100644 --- a/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeGenerator.kt +++ b/EpcQrCode/src/commonMain/kotlin/net/codinux/banking/epcqrcode/EpcQrCodeGenerator.kt @@ -16,8 +16,9 @@ open class EpcQrCodeGenerator { open fun generateEpcQrCode(config: EpcQrCodeConfig): EpcQrCode { val heightAndWidth = config.qrCodeHeightAndWidth val epcQrCodeContent = generateAsString(config) + val epcQrCodeContentBytes = epcQrCodeContent.encodeToByteArray() // qrCode.msg() contains a bug for UTF-8 characters -> encode manually to bytes - val qrCodeBitmap = qrCode.msg(epcQrCodeContent) + val qrCodeBitmap = qrCode.msg(epcQrCodeContentBytes) .scaled(heightAndWidth, heightAndWidth, true) val qrCodeBytes = convertToFormat(qrCodeBitmap, config.imageFormat)