Hi,
An encoding question, again.
I'm trying this simple code:
dim t as textOutputStream
t=MyFile.CreateTextFile
if t=nil then
MsgBox "Can't save the file: error "+str(f.LastErrorCode)+"."
Return True
end if
t.Write EFMyText.Text
t.Close
The text is supposed to have high-ascii characters because of my
current language.
Then, I open the file using TextEdit. The file does not have the
correct encoding (well, it can be expected).
So I change
t.write EFMyText.Text
to
t.Write ConvertEncoding(EFMyText.Text,Encodings.UTF8)
(the magically used UTF8)
but the problem remains.
Is it possible to write to a text file (no rtf data) so that it
"knows" the wanted encoding?
(I guess it should, otherwise, what a problem around the world!)
I guess I can tell TextEdit to use a specific encoding when I open
the file, but I doubt it's the correct way (I would prefer to have
saved the file correctly rather than repairing when the file is open
later, with any application).
Any comment welcome.
_______________________________________________
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>