utf-8 ansi xml

Hello All, Hope some one can help me with this. I have a Window xp English running a program that create an xml file with the Swedish letters åäöÅÄÖ, This text file is an ANSI format. I am unable to read this file from Navision using ‘Microsoft XML, version 2.0’.DOMDocument objects and unable to view this with IE 6.0 as I get an error when its trying to display Swedish letters. Now If I open up the xml file in notepad and save it as utf-8 then all works well. Is this a windows problem? Or must I solve this in Navision. If so how? Look forward to any input you have.

This is an encoding problem. If encoding is not declared in Processing Instruction, IE and other pharsers think it is in UTF-8. The program creating the XML-file have a problem.

Hello Clause, Thx for your responce, I was hopping it was a code page problem that I could fix in windows. SO NOW the problem is mine. What is the best way to convert my ANSI text file to UTF-8 format from with in Navision? Will I have to read ANSI and write UTF-8. How does Navision handle this? Is their a way of setting XML parameters before loading in the DOM? Many question but I just want to know the best way to convert my ANSI file to UTF-8 from with Navision. Regards Graham

Hello All, After alot of searching reading and testing I came up with this. Regards Graham Name DataType Length Subtype adoInStream Automation ‘Microsoft ActiveX Data Objects 2.8 Library’.Stream adoOutStream Automation ‘Microsoft ActiveX Data Objects 2.8 Library’.Stream XMLDocument Automation ‘Microsoft XML, version 2.0’.DOMDocument MyText Text 250 XMLNodeList Automation ‘Microsoft XML, version 2.0’.IXMLDOMNodeList XMLNode Automation ‘Microsoft XML, version 2.0’.IXMLDOMNode IF ISCLEAR(adoInStream) THEN CREATE(adoInStream); IF ISCLEAR(adoOutStream) THEN CREATE(adoOutStream); IF ISCLEAR(XMLDocument) THEN CREATE(XMLDocument); adoInStream.Open; adoInStream.Charset(‘iso-8859-1’); adoInStream.LoadFromFile(‘C:\Program Files\Superservice Menus\Export\2.xml’); adoInStream.Position(0); adoOutStream.Open; adoOutStream.Charset(‘utf-8’); WHILE (NOT adoInStream.EOS) DO BEGIN MyText := adoInStream.ReadText(250); adoOutStream.WriteText(MyText); END; adoOutStream.Position(0); XMLDocument.load(adoOutStream); LoadNodeList(XMLDocument,XMLNodeList,‘quote/vehicle_details’); IF CONFIRM(STRSUBSTNO(’%1’,XMLNodeList.length)) THEN; LoadNode(XMLNodeList,XMLNode,0); IF CONFIRM(STRSUBSTNO(’%1’,XMLNode.selectNodes(‘vehicledetails’).item(0).text)) THEN; LoadNodeList(XMLDocument : Automation “‘Microsoft XML, version 2.0’.DOMDocument”;VAR XMLNodeList : Automation "'Microsoft XML, version // Load Node List from XML Document. // General Function. XMLNodeList := XMLDocument.getElementsByTagName(ElementName); LoadNode(XMLNodeList : Automation “‘Microsoft XML, version 2.0’.IXMLDOMNodeList”;VAR XMLNode : Automation "‘Microsoft XML, version 2.0’ // Load Node from Node List. // General Function. XMLNode := XMLNodeList.item(RecordIndex);