473,385 Members | 1,311 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

XML and special characters ...

For reporting purposes I generate XML from an MS-Access 2002 database
and find that in this way I can format and display the data no problem
with a XSL/HTML template. Perfect!

However, then I found that I needed to replace my automatic MS-Access
output with a customised dump of the XML and find that I am now having a
problem with special characters (umlauts).

For my tests I have built two identical extracts one generated by
MS-Access and the other constructed by me using VBA. Here I find that
my (VBA generated) version produces an error message 'illegal
characters' (stopping at the point where umlauts: ä and ü are found) in
the browser while the MS-Access generated version still displays.

It can't be anthing in the content because both files are identical so I
am wondering whether I need to make any specific declarations when I
open the text file in VBA? Are there any hidden commands which indicate
which characterset the file will contain?

Any tips or links on the issue of handling special characters in XML
would be a great help.

Many thanks,
Alan Searle
Nov 30 '05 #1
2 1648
On Sun, 27 Nov 2005, Alan Searle wrote:
Any tips or links on the issue of handling special characters in XML
would be a great help.


If you write all special, non-ASCII characters as ä or ü
you don't have to worry.

--
Netscape 3.04 does everything I need, and it's utterly reliable.
Why should I switch? Peter T. Daniels in <news:sci.lang>

Nov 30 '05 #2
Alan Searle wrote:
For reporting purposes I generate XML from an MS-Access 2002 database
and find that in this way I can format and display the data no problem
with a XSL/HTML template. Perfect!

However, then I found that I needed to replace my automatic MS-Access
output with a customised dump of the XML and find that I am now having
a problem with special characters (umlauts).

For my tests I have built two identical extracts one generated by
MS-Access and the other constructed by me using VBA. Here I find that
my (VBA generated) version produces an error message 'illegal
characters' (stopping at the point where umlauts: ä and ü are found)
in the browser while the MS-Access generated version still displays.

It can't be anthing in the content because both files are identical so
I am wondering whether I need to make any specific declarations when I
open the text file in VBA? Are there any hidden commands which
indicate which characterset the file will contain?

Any tips or links on the issue of handling special characters in XML
would be a great help.


The default character encoding in XML is UTF-8, so unless one or other
of your sample files specifies something else, your XML processor will
assume UTF-8, and therefore the file that fails must be using some other
encoding. For most western European languages, ISO-8859-1 is sufficient,
so try prefixing the VBA file with an XML Declaration saying so:

<?xml version="1.0" encoding="iso-8859-1"?>

///Peter
--
XML FAQ: http://xml.silmaril.ie/

Nov 30 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Roy W. Andersen | last post by:
I've been searching google about this for days but can't find anything, so I'm hoping someone here can help me out. I'm trying to create zip-files without needing the zip-file extension in PHP,...
3
by: Barry Olly | last post by:
Hi, I'm working on a mini content management system and need help with dealing with special characters. The input are taken from html form which are then stored into a varchar column in...
5
by: Sakharam Phapale | last post by:
Hi All, I am using an API function, which takes file path as an input. When file path contains special characters (@,#,$,%,&,^, etc), API function gives an error as "Unable to open input file"....
17
by: Carl Mercier | last post by:
Hi, Is it possible to use special characters like \n or \t in a VB.NET string, just like in C#? My guess is NO, but maybe there's something I don't know. If it's not possible, does anybody...
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
5
by: Doc | last post by:
Hello! I'm experiencing a little problem counting the number of characters in a textarea on a html page. This is the content type of my HTML document content="text/html; charset=iso-8859-1" ...
1
by: sonald | last post by:
Dear All, I am working on a module that validates the provided CSV data in a text format, which must be in a predefined format. We check for the : 1. Number of fields provided in the text file,...
7
by: Trac Bannon | last post by:
When I load XML from a file into a dotNet XMLDataDocument, the UTF-8 codes are resolved but the 5 special XML entities are not. How can I force those 5 special character types to be translated?
3
KevinADC
by: KevinADC | last post by:
Purpose The purpose of this article is to discuss the difference between characters inside a character class and outside a character class and some special characters inside a character class....
0
by: AAaron123 | last post by:
Been playing with asp:changepassword and have it looking OK except that I can't elininate or change the title at the top that says "Change Your Password". It's a repeat of my pages title. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.