1. backya ayyappan
  2. PowerBuilder
  3. Monday, 6 July 2020 09:27 AM UTC

Hi,

Recently i have migrated PB 8 to 19 version. In code im getting symbols while converting blob to string.So i have converted to encodingANSI! format in many places.. it is working fine.but in one place im struggling. please help me.

//sItemDIN = string(blobmid(is_source,il_pointer,long(mfieldsize)))

sItemDIN = string(blobmid(is_source,il_pointer,long(mfieldsize)),EncodingANSI!) 

In the above line sitemdin has some symbols while debugging..

 

Regards,

Backya.

 

 

Kevin Ridley Accepted Answer Pending Moderation
  1. Monday, 6 July 2020 12:26 PM UTC
  2. PowerBuilder
  3. # 1

PB8 was not Unicode, PB2019 is, that's why you're seeing different results.  Where is the Blob coming from?  Sounds like it's not Ansi data in the Blob.  What type of encoding is the data?  Have you tried any of the other encoding values?

 

Kevin

 

Comment
  1. backya ayyappan
  2. Tuesday, 7 July 2020 10:31 AM UTC
Also i have doubt in these lines

blob{4} thelenblob

theLenBlob = BLOB(' ')

BLOBEDIT(TheLenBlob,1,BLOBMID(is_source,il_pointer,4))



is it right????
  1. Helpful
  1. Kevin Ridley
  2. Tuesday, 7 July 2020 11:57 AM UTC
Use FileReadEx directly to a blob instead of FileRead in a loop.
  1. Helpful
  1. backya ayyappan
  2. Tuesday, 7 July 2020 12:49 PM UTC
Kevin,

i have tried that Its not working..

BLOBEDIT(TheLenBlob,1,BLOBMID(is_source,il_pointer,4),EncodingANSI!)

ls_out=string(thelenblob,EncodingANSI!)

i got ls_out as empty string

is this a problem??



Regards

Backya

  1. Helpful
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.