Solved

Working with extended ISO Latin-1 ASCII chars in XML

Posted on 2012-03-28
7
656 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 82

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
Integrate social media with email signatures

Is your company active on social media? Do you also use email signatures? Including social media icons in your email signature is a great way to get fans for free. Let all your email users know you’re on social media quickly and easily, in a single click.

 

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 36

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 82

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now