Starshyne Emir wrote: "Null characters were made to be ignored. DBPro is doing exactly what it's expected from it: pretending that's not there.
I started programming in the old QBASIC and it treated null characters the same way. "
it's still a limitation of DBP.
Starshyne Emir wrote: "Frankly you should think on another way to do what you are intending to do, because null characters will be counted as nothing into any string, no matter how you try to assemble them."
I am implementing someone else's file format, which includes strings that have 0x00 characters in various parts. I don't have a choice in the matter. My quick and easy solution was just to change those characters to 0xFF when reading and change them back when writing. Workable but not a perfect solution. It could cause issues in the future if I need to do more complicated things.
Starshyne Emir wrote: "An array of bytes is a great idea, but you will need to provide the ASCII values manually as numbers or the issue will persist."
That's what I meant when I said array of bytes.
Starshyne Emir wrote: "An array of bytes is a great idea, but you will need to provide the ASCII values manually as numbers or the issue will persist.
In this example, you can see that the string lenght shown on screen is 1 instead of the expected 2. "
The example I provided demonstrated this.
Starshyne Emir wrote: "Better think on something else. I suggest redesigning your application and thinking on another solution to achieve your result."
Like I said that's not really an option here, I have to provide support for these characters.
I am mentioning it since people might have better methods that I didn't think of. Bored of the rings mentioned using Memory Banks (as a faster alternative to using memblocks) and memory pointers, which is part of a plugin. This might be needed in the long term if things get really complicated, but I was hoping for a solution that didn't require needing an additional plugin.