diff --git a/lib/Qrcode/Decoder/DecodedBitStreamParser.php b/lib/Qrcode/Decoder/DecodedBitStreamParser.php index 147361b..975879d 100644 --- a/lib/Qrcode/Decoder/DecodedBitStreamParser.php +++ b/lib/Qrcode/Decoder/DecodedBitStreamParser.php @@ -325,6 +325,8 @@ private static function decodeByteSegment( } else { $encoding = $currentCharacterSetECI->name(); } + // in case of no encoding found, default to UTF-8 + if (empty($encoding)) { $encoding = 'UTF-8'; } $result .= mb_convert_encoding($text, $encoding); //(new String(readBytes, encoding)); // $result .= $text; //(new String(readBytes, encoding));