471,594 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

XmlTextReader problem with some character Help!!

I'm trying to read the following XML file:

<mail>
<from>Rae</from>
<subject>Informacion de su Proceso de Titulacion</subject>
<body_mail>
<![CDATA[
Here I put text and I have to use this º simbol
]]>
</body_mail>
</mail>
I use the <![CDATA[ to avoid parse this area but I get Error message
beacuse º character, there is some way to support al char set including
accent and other special characters??


Nov 12 '05 #1
3 4333
What is the encoding of the document? If you are using an unicode encoding
(e.g. utf-8, which is the default without an XML declaration) you can use
any unicode character (including lots and lots of accents and special
characters), but of course you must use this encoding for all characters in
the file. A possible error is to use strings encoded in latin 1 (iso-8859-1)
without the correct XML declaration.

"Ekempd" <Ek****@discussions.microsoft.com> a écrit dans le message de news:
62**********************************@microsoft.com...
I'm trying to read the following XML file:

<mail>
<from>Rae</from>
<subject>Informacion de su Proceso de Titulacion</subject>
<body_mail>
<![CDATA[
Here I put text and I have to use this º simbol
]]>
</body_mail>
</mail>
I use the <![CDATA[ to avoid parse this area but I get Error message
beacuse º character, there is some way to support al char set including
accent and other special characters??


Nov 12 '05 #2
Try adding

<!DOCTYPE mail[
<!ENTITY % HTMLlat1 SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent"> %HTMLlat1;
<!ENTITY % HTMLspecial SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent"> %HTMLspecial;
<!ENTITY % HTMLsymbol SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent"> %HTMLsymbol;
]>

to the top of your document after your xml declaration. This will include all the latin and special character sets if it is not too much of an overkill for your needs!

Wole

"Lionel Fourquaux" <us**********@no-spam.invalid> wrote in message news:Oe**************@TK2MSFTNGP10.phx.gbl...
What is the encoding of the document? If you are using an unicode encoding
(e.g. utf-8, which is the default without an XML declaration) you can use
any unicode character (including lots and lots of accents and special
characters), but of course you must use this encoding for all characters in
the file. A possible error is to use strings encoded in latin 1 (iso-8859-1)
without the correct XML declaration.

"Ekempd" <Ek****@discussions.microsoft.com> a écrit dans le message de news:
62**********************************@microsoft.com...
I'm trying to read the following XML file:

<mail>
<from>Rae</from>
<subject>Informacion de su Proceso de Titulacion</subject>
<body_mail>
<![CDATA[
Here I put text and I have to use this º simbol
]]>
</body_mail>
</mail>
I use the <![CDATA[ to avoid parse this area but I get Error message
beacuse º character, there is some way to support al char set including
accent and other special characters??


Nov 12 '05 #3
Thax for the help I add

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


"Lionel Fourquaux" wrote:
What is the encoding of the document? If you are using an unicode encoding
(e.g. utf-8, which is the default without an XML declaration) you can use
any unicode character (including lots and lots of accents and special
characters), but of course you must use this encoding for all characters in
the file. A possible error is to use strings encoded in latin 1 (iso-8859-1)
without the correct XML declaration.

"Ekempd" <Ek****@discussions.microsoft.com> a écrit dans le message de news:
62**********************************@microsoft.com...
I'm trying to read the following XML file:

<mail>
<from>Rae</from>
<subject>Informacion de su Proceso de Titulacion</subject>
<body_mail>
<![CDATA[
Here I put text and I have to use this º simbol
]]>
</body_mail>
</mail>
I use the <![CDATA[ to avoid parse this area but I get Error message
beacuse º character, there is some way to support al char set including
accent and other special characters??


Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Thom McGrath | last post: by
reply views Thread by Anwar ali | last post: by

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.