Take a look at this and check if you could fine the problem..
http://support.realsoftware.com/listarchives/realbasic-nug/2004-02/ msg00615.html

Sven E

On 2007-01-04, at 20:01, Robert Livingston wrote:

Mac: RB 2007 Release 1

If I create a string

SomeString = "cat" + Chr(140) + "mouse"

The MacRoman character for 140 is a little a with a ring above it character

I can look at it in the MsgBox and it will look as I might expect: with the little a with a ring above it character
sitting between the cat and the mouse.

Now I can create text file with TextOutputStream that contains this string.

If I look at this file with BBEdit or whatever, it looks as I might expect. (as it did in the MsgBox)

Now I can import this text file with TextInputStream and assign it to a string and look
at that string in the debugger or in MsgBox.

It will not work. The Chr(140) fouls things up. The debugger might show a ? and the
MsgBox nothing at all and variations of this theme for that character.

Now, you can work around this by assigning Nil to the Encoding of the text input stream

tis.Encoding = Nil

It will then work OK. But I do not understand why it does not work in the first place. If the default encoding in RealBASIC and in TextOutputStream and TextInputStream is UTF-8 why are not the TextOutputStream and the TextInputStream "symmetric"

That is to say why don't you get back out what you put in?





_______________________________________________
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>

Reply via email to