realbasic-nug
[Top] [All Lists]

Re: WritePString weirdness...

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: WritePString weirdness...
From: Harrie Westphal <harriew at frontiernet dot net>
Date: Fri, 28 Mar 2008 13:24:10 -0500
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <226027DE-9E67-4701-90AD-12E8F3383CF6 at rbclass dot com>
On Mar 28, 2008, at 12:56 PM, Mark O'Neill wrote:
> If I use the following to write string to my preferences file:
>
> stream.WritePString(MyStringToStore)
>
> All works fine, except if the text to store is something like:
>
> © 2008 Me Enterprises
>
> When read back, it appears like this instead:
>
> © 2008 Me Enterprises
>
> A funny little character has been saved along with the string. This
> only does it if the text starts with @, if I omit the @ then there are
> no problems.

You showed the code used to write the string out. What code was used  
to read it in? You did use the PString version to read it back in  
didn't you. Because if you didn't then that funny character is the  
one byte length value at the beginning of the string of output.


=== A Mac addict in Tennessee ===

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>