473,416 Members | 1,548 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,416 software developers and data experts.

XML and special characters ...

I generate XML from an MS-Access 2002 database and find that 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? Yes, 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 3733
I don't know about a problem with umlauts and Access specifically, but
I do know that XML requires many special characters to use encoded
equivalents. For instance, the & character has to be &amp; , < has to
be &gt; , etc.

I use an ASP.NET page to write text to XML files (they drive my
website) and I've found that ASP.NET automatically converts special
characters to their XML equivalents. If nothing else, you may consider
using an external ASP.NET page to create your XML files from your
Access tables.

Nov 30 '05 #2
"Steve" <th*********@gmail.com> wrote in
news:11**********************@o13g2000cwo.googlegr oups.com:
I don't know about a problem with umlauts and Access specifically,
but I do know that XML requires many special characters to use
encoded equivalents. For instance, the & character has to be &amp;
, < has to be &gt; , etc.


Actually, it would depend on which DTD you're using. I don't do XML
(or XHTML), but I do know that with the HTML transitional DTD, you
don't have to encode the characters, but with the strict DTD, you
*do* have to encode them.

I have a table and a couple of functions for HTML entity encoding.
I'd be willing to post them on my website if anyone is interested.

But if the content is identical in the output (i.e., the one the
works doesn't entity encode the umlauts), then it must just be a DTD
declaration that needs to be changed, and you wouldn't need to worry
about encoding the data. Of course, you must look at the XML in a
plain-text editor to see if the encoding is there or not, as a
browser won't show you the encoding, just the end result (unless you
view source).

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.