Adeons Joined: 11/02/08 Posts: 5 Posted: 05/16/09 19:02:57 Hello How to read a text file without knowing the encoding? (UTF-8, ANSI, Unicode, Big endian Unicode) And also, how to write a file with a specific encoding? (in the Unicode case, including the BOM) Thanks
Hello
How to read a text file without knowing the encoding? (UTF-8, ANSI, Unicode, Big endian Unicode)
And also, how to write a file with a specific encoding? (in the Unicode case, including the BOM)
Thanks
Author Message kai Joined: 05/17/09 Posts: 4 Posted: 06/11/09 16:44:04 Hi! For reading and writing Unicode files, you can use the UnicodeFile? class. E.g. UnicodeFile!(dchar) f = UnicodeFile!(dchar)("C:\\Temp\\test.utf", Encoding.Unknown); dchar[] all = f.read();
Hi!
For reading and writing Unicode files, you can use the UnicodeFile? class. E.g.
UnicodeFile!(dchar) f = UnicodeFile!(dchar)("C:\\Temp\\test.utf", Encoding.Unknown); dchar[] all = f.read();