Alaska Software Inc. - Problem with QR Code
Username: Password:
AuthorTopic: Problem with QR Code
Piotr DziurlaProblem with QR Code
on Fri, 27 Sep 2013 23:23:24 +0200
Hi,to
I use QRCode ActiveX control (from MW6Tech) to generate QR code bitmaps.
The data property, in which my app "send" a text for encoding, must be a 
UTF-8 encoding text. Here is a sample code:

oControl := XbpActiveXControl():new()
oControl:CLSID  := "{3BB56637-651D-4D1D-AFA4-C0506F57EAF8}"
bOldError := ErrorBlock( {|e| Break(e)} )
BEGIN SEQUENCE
oControl:create(,, {0,0},{80,80})
 RECOVER USING oError
   IF oError:subCode == 6500
      DC_MsgBox(,,{'Error! ActiveX.not installed',;
                   'Please install aW6 QRCode.'})
      QUIT
   ENDIF
   RETURN('')
END SEQUENCE
ErrorBlock( bOldError )
* convert cTekst to UTF-8
cTekst:=cOemToUTF8(cTekst)
* set text to :data property
oControl:BorderStyle:=2
oControl:data:=cTekst

But polish fonts are false send to ActiveX control, for example in UTF-8 is
chr(196) + chr(135) and  to these control is send chr(166) and chr(231) 
instead of 196 and 135. What is wrong? The function cOemToUTF8() works 
properly,
the same is when I use directly
oControl:data := chr(196) + chr(135)

Regards
Piotr