ByteChr with Nullbyte gives empty string
Posted: Tue Oct 23, 2018 10:56 pm
ByteChr gives an empty string if the input a Nullbyte.
It is nessary on RAWdatas to not ignore a nullbyte.
I must use a little trick to solve the Problem, but is easier to see the problem:
temp$ = MidStr(received$,i,1)
Null$ = „/0“
j=Val(temp$)
If j=0
out$=out$ .. Null$
Else
out$ = out$ .. ByteChr(j)
EndIf
It is nessary on RAWdatas to not ignore a nullbyte.
I must use a little trick to solve the Problem, but is easier to see the problem:
temp$ = MidStr(received$,i,1)
Null$ = „/0“
j=Val(temp$)
If j=0
out$=out$ .. Null$
Else
out$ = out$ .. ByteChr(j)
EndIf