Whenever I have to write data into a text file following function has proven to fulfill my needs.
In case you want to export a file in Unicode encoding you just hand True for the parameter isUtf16Le, which will cause the FileSystemObject to encode the file in UTF-16 with low byte order mark (little endian).
If you however have to export something in UTF-8 or other encodings I suggest to use the following method.
It utilizes the ADODB API in order to create a UTF-8 encoded text stream. The byte order mark is removed from this stream before it is written into a file.
This function references the following APIs
The following resource provided me with the source I needed to create UTF-8 encoded text files without BOM.