Encoding problem med xml fil
HejsaHvordan gemmer jeg en xml fil med asp, med den rette encoding.
Jeg har prøvet med:
Set objFso = CreateObject("Scripting.FileSystemObject")
filespec = ("f:\Faktura\Udbakke\"&objRS("Invoice_ID")&".xml")
Set f = objFso.CreateTextFile(filespec,2,True)
f.Write("<?xml version=""1.0"" encoding=""UTF-8""?>" & vbCrLf & vbTab)
f1.Write("<Invoice xmlns=""http://rep.oio.dk/ubl/xml/schemas/0p71/pie/"" xmlns:com=""http://rep.oio.dk/ubl/xml/schemas/0p71/common/"" xmlns:main=""http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:schemaLocation=""http://rep.oio.dk/ubl/xml/schemas/0p71/pie/ http://rep.oio.dk/ubl/xml/schemas/0p71/pie/pieStrict.xsd"">" & vbCrLf & vbTab & vbTab)
osv. osv.
Det virker bare ikke. Når jeg prøver at åbne xml filen i IE for jeg denne fejl:
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Switch from current encoding to specified encoding not supported. Error processing resource 'file:///F:/Faktura/Udbakke/k...
<?xml version="1.0" encoding="UTF-8"?>
Jeg går ud fra at det er et encoding problem ??
Kan nogen hjælpe ??
/Mickill
