![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: DOMDocument encoding in ouput from a VB6 application DOMDocument encoding in ouput from a VB6 applicationTo: NULL Date: 4/1/2005 3:11:00 AM Hi, I am using VB6 to generate XML documents. My application reads in text (line by line) from templates (i.e. text files that are saved as .xml files, in ANSI encoding). I create the output as a text file with a .xml extension after parsing the templates, using Scripting.TextStream. I need the output XML files to be saved with "UTF-8" encoding. When I produce the output XML files, I specify in the declaration: <?xml version="1.0" encoding="UTF-8" ?> My problem is that I am unable to save the ouput as UTF-8. When I open the output file in Notepad and select Save As, the current encoding is still ANSI. If I open the output file and save it as (All Files) --> UTF-8, this DOES save it in the correct encoding. I know this becoause I can then open this file again and if I select Save As, the current encoding is now UTF-8. I need to be able to save as UTF-8 programmatically as my application is a scheduled service. Getting the customer to open the output file in Notepad and then Save As UTF-8 is an option, but not a feasible/practical one. I have attempted to use the DOMDocument, i.e. load the output file into this object and then save it again (as I heard that the .save method saves as UTF-8). However, this is still saving the output as ANSI (I checked using Notepad). I appreciate any advice / guidance on how to tackle this problem. Thanks. Jimmy | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
