Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Createprocessinginstructions don't show encoding
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01680811
Message ID:
01680821
Views:
37
Hi Rick,

thanks für the explanation.

Best regards

Thomas

****************

UTF-8 is the default encoding format for XML, so it doesn't need to be there. Guessing it gets stripped as it is the default. You should only need to provide an encoding if you use something **other than UTF8** (like 1252 that FoxPro does when not specified).

+++ Rick ---

>Hi there,
>
>I want to create a xml-file using msxml2.domdocument encodesd in UTF-8
>Almost everything is fine but two things do not work as expected.
>
>I start with:
>
>oxml = createobject("msxml2.domdocument")
>opi= oXML.createProcessingInstruction('xml','version="1.0" encoding="UTF-8"')
>* or, as found in a Doug Hennig post
>opi= x.createProcessingInstruction('xml','version="1.0"' + ' encoding="UTF-8"')
>oXML.appendChild( oPI )
>
>But it makes no difference what I use, the encoding doesn't show up in the processing instruction.
>What am I doing wrong here?
>
>I assume the second problem is a follow up. When I try to save the file,
>I get an error telling me, that some chars cannot be saved in ISO-8859-Mode"
>By now I helped myself by saving the file with strtofile(oXML.xml, cOutput)
>but I would prefer the save-method to work
>
>Best regards
>
>Thomas
Previous
Reply
Map
View

Click here to load this message in the networking platform