i noticed during analyzing my created Textfiles, I done with the new Framework, in a Hex Editor (Hex Friend), they dont have a Byte Order Mark. How can I add? Found this code snippet for the classic Framework:
[code]Dim f As Xojo.IO.FolderItem = Xojo.IO.SpecialFolder.Documents.Child(“SaveData.txt”)
Dim output As Xojo.IO.TextOutputStream = Xojo.IO.TextOutputStream.Create(f, Xojo.Core.TextEncoding.UTF8)
output.Write text.FromUnicodeCodepoint(&hFEFF)
output.WriteLine(“This text is appended to the end of the file.”)
output.Close[/code]
So you write &hFEFF and depending on text encoding, you get the bytes for UTF-16, UTF-8 or whatever.
Wow, thats a nice snippet. Like magic, one codepoint which automatically writes the Byte Order Mark depending on Xojo.Core.TextEncoding
Thanks Christian