1. Hussain Albloshi
  2. PowerBuilder
  3. Tuesday, 7 December 2021 14:52 PM UTC

Please help about Deconing  arabic 

 

//--------------QR Code ------------------------------------
int qr_opcl
date qr_s_date , qr_e_date
string g_ls_text,ls_text
IF dw_Print.rowcount() > 0 then
dec xvat,total
string TAG1,TAG2,TAG3,TAG4,TAG5 ,output,xchr
string TLV1,TLV2,TLV3,TLV4,TLV5
xvat =dw_Print.getitemdecimal(dw_Print.getrow(),'xx_tax')
total =dw_Print.getitemdecimal(dw_Print.getrow(),'xnet_tot')
SELECT brn_setup_info.bnm INTO :TAG1 FROM brn_setup_info WHERE brn_setup_info.bno = :bno ;

TAG2="300918795800003"
TAG3= string( today(),"yyyy-mm-dd" ) + string( today() ,'hh:mm' )+'Z'
TAG4=string(total)
TAG5=string(xvat)
TLV1= String(Char(1)) + String(Char(LEN(TAG1)))   ///   ARABIC  This one its to display in Arabic after decoding 
TLV2= String(Char(2)) + String(Char(LEN(TAG2)))
TLV3= String(Char(3)) + String(Char(LEN(TAG3)))
TLV4= String(Char(4)) + String(Char(LEN(TAG4)))
TLV5= String(Char(5)) + String(Char(LEN(TAG5)))
output=TLV1+TAG1+TLV2+TAG2+TLV3+TAG3+TLV4+TAG4+TLV5+TAG5
Blob lblb_data
String ls_Base64Str
CoderObject lnv_CoderObject
lnv_CoderObject = Create CoderObject
ls_text = output
lblb_data = Blob(ls_text, EncodingUTF8!)
ls_Base64Str = lnv_CoderObject.Base64Encode(lblb_data)
destroy lnv_CoderObject
ls_text = ls_Base64Str
nv_qrcode lnv_qrcode
Long ll_retval
string qr_text
dw_Print.object.p_qr.fileName = ''
ll_retval = lnv_qrcode.get_qr_code_bitmap('qrcode.bmp', ls_text,1 , 1, 10)
If ll_retval = 0 Then
dw_Print.object.p_qr.fileName ='qrcode.bmp'
end if
END IF
//--------------QR Code End -------------------------------

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 7 December 2021 20:13 PM UTC
  2. PowerBuilder
  3. # 1

Your "nv_qrcode" might have a decode function, but since I don't know anything about that object, I cannot tell.

 

Not too long ago, I made one myself: Here's a small sample powerbuilder application here:

https://github.com/mjl38/PB_sample_app_QRCodes

And here's the C# .Net solution that I used to build the (32 bit) DLL: https://github.com/mjl38/QRCodes

I tested with Chinese and Arabic characters, so it should work.

 

There are more solutions, like this one made by Bruce:

https://community.appeon.com/index.php/codeexchange/powerbuilder/284-qr-code-generator#341

regards.

Comment
There are no comments made yet.
Hussain Albloshi Accepted Answer Pending Moderation
  1. Tuesday, 7 December 2021 17:59 PM UTC
  2. PowerBuilder
  3. # 2

QR encrypted image

 

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 7 December 2021 17:16 PM UTC
  2. PowerBuilder
  3. # 3

Hi,

What exactly is it you want to do?

Do you want to DECODE a previously QR encrypted image, so it gives you the initially used arabic text?

regards.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.