Quantcast
Channel: SCN : Discussion List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2881

[Help] powerbuilder 6.5 to 12.6, fileopen with unicode

$
0
0

Good evening,

 

Hi, today I'm asking your help. To complete a migration from pb 6.5 to pb 12.6.

 

I have this code:

 

double li_FileNum, loops, ld_ind

long flen, bytes_read

blob b , tot_b , b_base

string ls_b

double ld_asc

SetPointer(HourGlass!)

 

if FileExists (fa_archivo_entrada) then

else

messagebox( 'No existe el archivo de entrada', 'El archivo de entrada de la interfase de setFX no existe y el proceso no continuará' )

return 0

end if

 

 

string ls_nombre_archivo

ls_nombre_archivo = fa_archivo_entrada

flen = FileLength(ls_nombre_archivo )

li_FileNum = FileOpen(ls_nombre_archivo, StreamMode!, Read!, Shared! )

loops = 1

IF flen > 32765 THEN // Determine how many times to call FileRead

IF Mod(flen, 32765) = 0 THEN

loops = flen/32765

ELSE

loops = (flen/32765) + 1

END IF

END IF

FOR ld_ind = 1 to loops

bytes_read = FileRead(li_FileNum, b) // Read the file

tot_b = tot_b + b

NEXT

FileClose(li_FileNum)

 

When I'm trying to read the tot_b blob variable in a messagebox at pb 12.6, that shows me all data in Japanese format or something. And when I'm doing this in pb 6.5, the messagebox shows me all data in Unicode format. What I have to do in this case ?

 

Thanks for your help.

 

Jimmy Perez


Viewing all articles
Browse latest Browse all 2881

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>