Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Working with extended ISO Latin-1 ASCII chars in XML

Posted on 2012-03-28
7
Medium Priority
?
684 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 84

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
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!

 

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 38

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 84

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

877 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