W dniu środa, 16 kwietnia 2014 20:21:31 UTC+2 użytkownik Piotr Kubacki napisał:
> I am using AS version of library, and have problems with decoding utf-8 (polish to be specific). Does anyone has a solution to this?
I am using online generator
http://www.qr-online.pl/index.php for testing.
Here is How I decode it
var qrCodeReader:QRCodeReader = new QRCodeReader();
var lsource:BufferedImageLuminanceSource=new BufferedImageLuminanceSource(bitmapData);
var bitmap:BinaryBitmap=new BinaryBitmap(new GlobalHistogramBinarizer(lsource));
var ht:HashTable=null;
ht=this.getAllHints();
var result:Result=null;
try {
result=qrCodeReader.decode(bitmap, ht);
}
catch (error:Error)
{
trace("decoding error");
return;
}
private function getAllHints():HashTable
{
var ht:HashTable=new HashTable();
ht.Add(DecodeHintType.POSSIBLE_FORMATS, BarcodeFormat.QR_CODE);
ht.Add(EncodeHintType.CHARACTER_SET, "UTF-8");
return ht;
}