Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How to encode XML file with UTF-8

From: "Hilary" <anonymous@-----------.---------.--->
To: NULL
Date: 4/1/2004 4:05:00 AM
>-----Original Message-----
>"Hilary" <anonymous@d...> wrote...
>> I'm having a problem encoding a generated XML file with
>> UTF-8.
>>
>> In VBA I create a file for output using the "Open <file
>> name> For Output" command, and then extract information
>> from an Access DB and write it to the file using
>> the "PRINT" command. My XML declaration statement
>> specifies the encoding to be UTF-8: <?xml version="1.0"
>> encoding="UTF-8"?> . However, when I view the XML file
>> using IE, I get an "invalid character was found in text
>> context" error. I know this is resulting from the 
document
>> content not being encoded.
>
>Guessing here, but I suspect that you're printing out in 
a different
>encoding (maybe ISO-8859-1, maybe UCS-2). Can't give a 
solid answer without
>seeing the code.
>
>> I need to be able to generate xml files that are 
properly
>> encoded with UTF-8. Does anyone know how I could
>> programmaticallly do this in VBA?
>
>you'd need to use the save() method on your XML object 
instead (which will
>know about serialisation)
>
>
>.
>

Thanks Rowland, that worked a treat!


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent