October 31, 200619 yr I am trying to import xml-data coming to me in ISO-8859-1 format. I have problem importing files when: - content of a field include i.e. "&". Can not open the file at all - content of fields include Swedish characters "å, ä ,ö". Can open but don't import the characters correct. A file can look like: <?xml version='1.0' encoding='ISO-8859-1'?> 2006-10-26 10:41:46 vartannat lysrör lyser i skärmtaket 1491060 BELYSNINGSSYSTEM (EX, UNDER SKÃRMTAK; ANNAN SS BELYSNING)
October 31, 200619 yr I'm assuming you have an xsl stylesheet that is working, other than the above problem? Try adding the disable-output-escaping="yes" attribute to your element selection. Example (you'd do it differently; but this is the idea) (P.S. When you post XML code here, esp. if it has characters you don't want messed up, it's best to surround it with bracketed "code, /code" tags (can't type 'em here). Edited October 31, 200619 yr by Guest
October 31, 200619 yr Author I have already tried without success so I guess that I don't get it right. I attach files. If you should have time to look I would be very glad! 0000369475.txt import.txt
October 31, 200619 yr The encoding of your XML is not ISO-8859-1, but UTF-8. You see that when you click the 0000369475.txt link and then change the encoding of your browser (Firefox: View > Text Encoding) to UTF-8. Then the Swedish characters are displayed correctly. It's also clear from looking at the wrongly encoded file, because two bytes were needed per Swedisch umlaut character. Just replace ISO-8859-1 by UTF-8 in the XML heading line of 0000369475.txt and in import.xsl. Also add a immediately after your tag.
November 2, 200619 yr Author I have tried adding in import-stylesheet with no success. The XML-file come to me. I can not make changes and the company sending them don't want to either. Maybe I changed the encoding saving the xml-file as text? Trying to open the original xml-file in Firefox UTF-8 is chosen, I can not change, but the characters are shown badly.
November 2, 200619 yr Tell the company they shall set it as UTF-8. This is definitely not ISO-8859-1.
Create an account or sign in to comment