[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Unrecognised XML characters

Posted on 2005-05-17
2
Medium Priority
?
753 Views
Last Modified: 2013-12-03
When running my XML file through Altova XMLSpy i get this error when it view it:

Your file contains 10 characters it should not, these are

#150; (0x96), #146; (0x92)

Does anyone know what chars these are?

I am using xml version='1.0' encoding='iso-8859-1'.

Is that the correct encoding type for English?

TIA.

Picco
0
Comment
Question by:crmpicco
2 Comments
 
LVL 7

Expert Comment

by:LandyJ
ID: 14023037
#150 (0x96) is a ` (a grave accent or upper left to lower right apostrophy)
#146 (0x92) is a \  (backslash)

These are system identifiers to XML and need to be escaped if they are used in your data.
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 160 total points
ID: 14027101
Hi,

Is this the right encoding?
I would say yes. It is Iso Latin 1, I think still used in most applications and though the XML recommendation doesn't force a parser to support it, most of them do.

You can see the list at
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/charsets/charset1.asp
and then you will see that 128 to 156 are not supported

You would run into the same problem using "UTF-8" because UTF-8 just copies Iso Latin in the 1 byte range.

The encoding "windows-1252" is exactly the same, but uses the space 128 - 156 for some extra characters. eg. the Euro Sign is in that space. That is exactly the reason why so many people are using this Windows version of Iso Latin 1 (called Windows Latin 1)
It is supported by XML SPy and windows parsers. So it is OK for use in a Windows centric environment. Beware for export though.
http://support.microsoft.com/default.aspx?scid=kb;en-us;197368#kb1

There is something now, called :encoding='iso-8859-15' that adds some extra characters, also the Euro-sign to Iso Latin 1 and apparently it is supported in XML-Spy. I don't have too many details.

I don't know how you want to render the characters in the end. But if you are only concerned about correct storage, then I would go for a preprocessing step. Use some Regular Expression tool to walk through the XML and replace the characters you mentioned by – and ’ provided they are correct in the unicode standard. Or find the exact meaning in the unicode tables.
For reference you can go to www.unicode.org.

If the only tool in your toolbox is Spy, I asume you can twiddle with some scripting onLoad.

I hope this helps. If you have more questions, I am happy to help

Gertone

 
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question