>Aha. Well socket.ReadAll does not define the encoding of the string,
>so RB will not know how to treat it as text. So you may not get the
>results you expect if you do things like add it to another string.
>If that's all you're doing, then these files will contain exactly the
>bytes that came from the socket.
Only one of them. :-)
>Then in the process of converting to mbox-Format, you have messed up
>the encoding of the strings.
All what I do I had posted. It is the attaching of a "from"-line at the
beginning of each mail/article and appending a CR.
> Most likely all you need to do is
>DefineEncoding of the data as it comes in, and your code (which
>implicitly assumed some encoding, though RB has no way of knowing
>this) will work as it used to.
So I have to define the encoding of what? I only want to write data without
any encoding. If you look at the code I had posted you will see, that I do
a writeLine with the "From"-line this should not change the encoding of the
data from the socket. The I am writing the data of the socket added with a
CR. Is this the problematic part? The CR is a global constant with chr(13)
inside it. Will WriteLine textencode the data to UTF-8 (the data is changed
as I see in the file) and attach the CR (which is UTF-8 encoded).
How can I write this part so that it will work with 4.5.3 and 5.x? I can
not change completely to 5.x because there are other bugs
(CarbonStandardWindowMenu!) in 5.x that don't let me change.
A searchable archive of this list is available at:
<mailto:realbasic-betas-off at lists dot realsoftware dot com>
Subscribe to the digest:
<mailto:realbasic-betas-digest at lists dot realsoftware dot com>