Le 03/02/2015 12:45, Rolf-Werner Eilert a écrit : > I observed that Win7 tends to add some kind of flag byte(s) at the > beginning of the file when it's UTF-8 (under VB).
Yes, this is one of the (many) design failures of windows. > > Otherwise, I have solved the problem in one of my programs that must > write UTF-8 files for a Win (VB) and Linux (Gambas) client, by adding a > CR+LF at the end of each line when writing in Gambas and then Trim() > each line when reading the files. The VB client, of course, can just > read and write as it's used to do. The 'Line Input' instruction can deal with any end-of-line sequence (Linux, Mac & Windows). See the Stream.EndOfLine property. Its value can be: - gb.Windows: the end-of-line sequence is "\r\n". - gb.Mac: the end-of-line sequence is "\r". - gb.Unix: the end-of-line sequence is "\n" (*or* "\r\n" on reading). Note that gb.Unix allows you to read both Unix and Windows format, but only write Unix format. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user