Solved

Working with extended ISO Latin-1 ASCII chars in XML

Posted on 2012-03-28
7
666 Views
Last Modified: 2012-05-05
I am experiencing some difficulty working with some extended chars in my XML, using Delphi 5 as my environnment.

It relates to char codes 129-159.  After I have passed my XML data (containing ISO code refs eg. "Ÿ") into DOM, when extracting content I receive a question mark char rather than the aforementioned chars.

I have tried an assortment of parsers within my Delphi 5 environment with the same result, including the import of MS XML DOM parser (see http://www.howtodothings.com/computers/a1236-importing-xml-dom-parser-in-delphi.html)

I have also played with a variety of encoding options, including UTF-8, ISO-8859-1 etc with no change.

Please could someone advise me on how to work with these extended chars.
0
Comment
Question by:brenlex
7 Comments
 
LVL 19

Expert Comment

by:Thommy
ID: 37779531
Check if this former EE question solves your problem...
Delphi+XML+UTF + € problem
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37779680
I use Alan Wood's site for most of these questions.  The problem is that char codes 129-159 are part of the Windows ANSI character set but Not part of the Latin-1 character set.  Read about it here: http://www.alanwood.net/demos/ansi.html
0
 

Author Comment

by:brenlex
ID: 37780770
Thommy -- I had already tested with the code at above link before posting my Q. Unfortunately still no change -- still returns the question marks and writes them to file also.

DaveBaldwin -- At http://www.ascii-code.com/ they indicate that the range 129-159 is part of  Windows ISO Latin-1 Extended chars.

Note: At this juncture I am not only experiencing difficulty with 129-159, but also with the 'euro' (€) symbol.

What am I missing !?
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Accepted Solution

by:
brenlex earned 0 total points
ID: 37781138
I think I have just answered my own question...

It has just occurred to me, all parsers are going to have the problem if I store the chars as escape codes eg. "&#159;" as it is an HTML standard, NOT an xml standard (other than for the known five : ", ', <, > and &).  

So it looks like it always comes down to the specified encoding in the xml doc headers, and ensuring your chosen parser supports the specified encoding.
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 37781204
check the font you are using to display the character symbols
some fonts do not contain symbols for all unicode characters/ ansi characters

Courier New / Lucida console ...
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37783359
@brenlex, that table is wrong.  While those characters are in ISO 8859-1, they are Not at those code points, 128-159.  Only Windows ANSI puts them at those code points.  This is a known problem.

http://en.wikipedia.org/wiki/ISO/IEC_8859-1
http://htmlhelp.com/reference/charset/
http://www.i18nqa.com/debug/table-iso8859-1-vs-windows-1252.html
0
 

Author Closing Comment

by:brenlex
ID: 37932339
Use a better parser.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

832 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