This code shows that ASCII characters between 128-159 are changes to 63 in the Windows version of PB but works perfectly in the Linux version. It seems to me whether characters are defined or not the ASCII value put into the memory should not be altered. I have equipment that sends text strings that can contains these values which represents the status of the equipment so having the value changed means I cannot accurately process the data in the Windows version. I will now have a Windows and a Linux version of this particular routine to handle the data properly.
Code: Select all
*txBuffer=AllocateMemory(5)
For ln.i=1 To 255
lcTxt.s = Chr(ln)
PokeS(*txBuffer,lcTxt,StringByteLength(lcTxt,#PB_Ascii),#PB_Ascii)
If PeekA(*txBuffer) <> ln
Debug Str(ln)+" "+Str(PeekA(*txBuffer))
EndIf
Next
FreeMemory(*txBuffer)