Solved

Working with extended ISO Latin-1 ASCII chars in XML

Posted on 2012-03-28
7
663 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
Can’t get the mobile email signature right?

Not having any luck when trying to create an email signature for mobile devices? Does the formatting keep messing up? Make sure you have great email signatures on all devices by using Exclaimer Cloud - Signatures for Office 365.

 

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

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

Question has a verified solution.

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

Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
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…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

863 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

21 Experts available now in Live!

Get 1:1 Help Now