2 problems, one leads to the other:
I was happily saving input to a ListBox as text file until I altered it to take
multiline entries via an EditField. I found that the single byte which marks
EndOfLine was read as end of string, and entry to the cells was therefore
scrambled.
(First question - is this to be expected?)
So I changed to binary file.
The problem that this raised is that when I enter a "£" symbol to a string,
saving it with
b.writeshort len(s)
b.write s
results in a byte of hex C2 being placed before the A3 which represents the
symbol. Therefore it does not read back correctly since the entry is one byte
longer than the string.
(Second question - is this to be expected?)
(I am somewhat piqued - to put it politely - to find that there is no such
problem with a "$" symbol)
In order to get round this, I have to monitor for the symbol in every string
and enter it as "chr(163)".
Regards
Bernard
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>