Good Afternoon everybody.
I'm trying to generate a text file for our Electronic Invoicing supplier to digitally firm and generate the XML and the PDF file for the company I work in.
I'm using the "FileOpen" command in VB NET 2017, just I used to do with VB 6.0 and VB Net 2010 a few years ago, and in fact, I'm creating the output text file correctly.
this is the code:
strFileName = strPath + "Facturas_Texto\" + IDFiscal + ".txt"
If System.IO.File.Exists(strFileName) Then
System.IO.File.Delete(strFileName)
End If
FileOpen(1, strFileName, OpenMode.Output)
I'm using the statement "Print" to write the required lines one by one.
The point now is our vendor wants the file enconding with UTF-8 and avoid BOM.
I have read this encoding characters and avoiding the BOM was a matter of building HTML and XML files, but I´ve never tried before to achieve this in a text file, specially generating it thru VB net 2017.
I saw I can edit the file thru the notebook and save it with this UTF-8 encoding, but I need to do it via the vB net code.
I'd really appreciate any help, or suggestion about how to do this or where to look for information about it.
Thank you very much.
What I have tried:
I am searching thru the Internet trying to find a way to do this.