Solved

Working with extended ISO Latin-1 ASCII chars in XML

Posted on 2012-03-28
7
669 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
Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
This article summaries thoughts and ideas from two years of sustained use. It provides good reasoning to make the jump to Windows 10.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

685 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