On Mar 28, 2008, at 11:56 AM, Mark O'Neill wrote:
> If I use the following to write string to my preferences file:
>
> stream.WritePString(MyStringToStore)
I don't recommend that. PStrings are an old Mac OS 9 thing; they
aren't particularly encoding-savvy, and of course they don't support
strings greater than 255 bytes (that's bytes, not characters).
The problem you're seeing is no doubt that ReadPString, being a
legacy function only intended for reading old Mac OS 9 files (which
used WorldScript rather than Unicode), has not properly defined the
encoding of the string. You could correct this with DefineEncoding,
but I recommend you quit using PStrings for your own data entirely.
Best,
- Joe
--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|