On Mar 31, 2008, at 8:27 AM, Arnaud Nicolet wrote:
> Why not WritePStringWithEncoding and ReadPStringWithEncoding that
> writes/reads like a PString with, additionally, a byte for the
> encoding?
Because who wants a string reading/writing method that's limited to
255 bytes?
>> Sure you can: string.Encoding gives you exactly that.
>
> Yes it does, but what do you do with the result to save it and
> retrieve it?
Write out its .Code value, and upon reading, call
Encodings.GetFromCode. (Which appears to be undocumented, but this
is nothing more than an omission in the documentation; GetFromCode
was certainly an intentional feature and has always worked fine.
It's probably in the release notes somewhere around 5.0.)
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>
|