At 8:34 PM -0400 4/8/06, [EMAIL PROTECTED] wrote:
RB's textencoding doesn't handle UTF-16 encoded files with
non-native endianness. That seems to be your problem. If that is
the case the easiest way would be to open the file with a program
like TextWrangler (for the Mac) and save it in native endianness or
even better in UTF8.
Hey, that fixed it! I used TextEdit to save a new copy of the file
using UTF-8, and now it works
I doubt this was because of non-native endianness; I imagine you
simply failed to tell REALbasic that this data was UTF-16. The
default encoding assumed by TextInputStream is UTF-8, which is why
saving your file in UTF-8 happened to fix it. It'd still be better
to be explicit when you read in the file.
If you're not reading in the file from disk, but have embedded it
inside your app, then it's even MORE important that you explicitly
define the encoding of the string before you do anything with it.
Best,
- Joe
--
Joseph J. Strout
[EMAIL PROTECTED]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>