Hi,

I am tring to understand the basics of text encoding.

I wrote the following code :

  Dim f As FolderItem
  Dim t as TextOutputStream

  f = GetFolderItem("Preferences.txt")

  if f.Exists then
    t = f.AppendToTextFile
  else
    t = f.CreateTextFile
  end if

  t.write ConvertEncoding(Editfield1.text, Encodings.UTF8)
  t.close


When I write in editfield1 the following accentuated text :

é à è ç !!!

If I open the Preferences.txt file with TextEdit, I get :

?© ?† ?® ?ß !!!

The preview in the finder shows the text properly, and so does NeoOffice...

I tried UTF16, MacRoman without any luck with Textedit.

So, the question is : What shall I use to be sure that any Wordprocessor/Text Editor will display my file correctly on Mac, on Windows and in a multiplatform way?

Is there somewhere in a text file that we can specify the encoding used at the creation, so the Wordprocessor will know?


TIA,


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