Problem med UTF-8
Hejsa,Jeg laver et XML domument med følgende kode. Men når jeg kommer til æøå kommer den dog med fejl??? hvordan kan jeg fixe det??
-------------------------------------------------------
set findallproductsxml = Connxml.Execute("SELECT * FROM produkter WHERE Plagerstatus > 0 AND Pshowstatus = 'active'")
writethisxml = "<?xml version='1.0' encoding='utf-8'?>" & vbcrlf & vbTab
writethisxml = writethisxml & "<data>" & vbcrlf
do while not findallproductsxml.eof
writethisxml = writethisxml & "<ads>" & vbcrlf
writethisxml = writethisxml & "<headline>"&findallproductsxml("Poverskrift")&"</headline>" & vbcrlf
writethisxml = writethisxml & "<description>"&findallproductsxml("Pbeskrivelse")&"</description>" & vbcrlf
writethisxml = writethisxml & "<price>"&findallproductsxml("Ppris")&"</price>" & vbcrlf
set findallcategory = Connxml.Execute("SELECT * FROM produktkategori WHERE PKID = "&findallproductsxml("Pnogle")&"")
writethisxml = writethisxml & "<category>"&findallcategory("PKoverskrift")&"</category>" & vbcrlf
findallcategory.close
writethisxml = writethisxml & "<url>uniqueproduct.asp?PID="&findallproductsxml("PID")&"</url>" & vbcrlf
writethisxml = writethisxml & "<productid>"&findallproductsxml("PID")&"</productid>" & vbcrlf
writethisxml = writethisxml & "<postcode>4400</postcode>" & vbcrlf
writethisxml = writethisxml & "<date_modified>"&now()&"</date_modified>" & vbcrlf
writethisxml = writethisxml & "<usednew>N</usednew>" & vbcrlf
writethisxml = writethisxml & "<picurl>upload/butik/"&findallproductsxml("Pbillede")&"</picurl>" & vbcrlf
writethisxml = writethisxml & "</ads>" & vbcrlf
findallproductsxml.MoveNext
loop
writethisxml = writethisxml & "</data>"
dim fs,tfile
set fs=Server.CreateObject("Scripting.FileSystemObject")
set tfile=fs.CreateTextFile("d:\web\web.dk\www\xmlfindalt.xml")
tfile.WriteLine(""&writethisxml&"")
tfile.close
set tfile=nothing