At 2:06 PM -0800 11/19/03, Christopher Morrill wrote:
I doubt that I'm doing anything wrong because the other strings save
without a problem. So is this a bug or just an RB limitation?
Yes -- I ran into the same problem, corrupting some or all byte
values with the first bit set (ASC values > 127).
Under what circumstances?
Evidently RB cannot write strings as pure binary data. It insists
on performing some kind of text conversion -- even when writing to a
binary file.
Not true. The contents of a string are written out to a file exactly
as they are, byte for byte.
This may be considered a "feature," not a bug. To me, however, the
whole point of a binary file is to store data in the form we choose
-- not "converted" as somebody else sees fit.
We agree.
In my case, my program is producing an RTF file, and the text
conversion being "helpfully" interposed by RB resulted in corruption
of the file.
RB interposes no text conversion.
As a work-around, I was forced to loop through every output
string, byte by byte, writing each byte individually. Perhaps
there's a better way.
There is indeed. Please post a simple example of what you think is
going on, and perhaps we can shed some light on it.
Best,
- Joe
--
,------------------------------------------------------------------.
| Joseph J. Strout REAL Software, Inc. |
| joe at realsoftware dot com http://www.realsoftware.com |
`------------------------------------------------------------------'
- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|