The PEEKS() function is too often used with these functions so we could simplify the code with an update of UTF8() and ASCII() like that:
*Buffer = UTF8(String$, StringUTF8$)
*Buffer = ASCII(String$, StringASCII$)
Example:
ASCII("OK", ASCII$)
Debug ASCII$
M.
Because PB is unicode, update UTF8() and ASCII()
Re: Because PB is unicode, update UTF8() and ASCII()
Hi,
you have not fully understand what the procedures do.
What you want is on one side not possible and on the other it results in memory leaks.
Case 1
If you convert a normal string to ascii, you can not use debug to show it, because it is no longer in unicode.
You can check this with the memoryviewer.
Case 2
On the other side, if you have a procedure like
*Buffer = Unicode(String$, StringASCII$)
you forget to free the buffer and you have a memory leak.
Bernd
you have not fully understand what the procedures do.
What you want is on one side not possible and on the other it results in memory leaks.
Case 1
If you convert a normal string to ascii, you can not use debug to show it, because it is no longer in unicode.
You can check this with the memoryviewer.
Case 2
On the other side, if you have a procedure like
*Buffer = Unicode(String$, StringASCII$)
you forget to free the buffer and you have a memory leak.
Bernd