473,372 Members | 1,529 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,372 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 4401
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Thom McGrath | last post by:
I have a text area that people should type in (duh) which will later be displayed for other users via HTML. I've taken care of the HTML aspect in a pretty cool way, but I worry about character sets...
4
by: Daniel Kster | last post by:
Is there someone who has got some tips on how to convert text encoded with character referense ({) to unicode or uft-8 format using VB.net? Is there a function or something that can help with the...
0
by: Marko Maehner | last post by:
Hi, I have a strange problem with my xml file. In the schema of this xml file I have set one column to autoincrement. When I enter the data in my xml file directly, the autoincrement-column gets...
1
by: Borgbjerg | last post by:
I've got a multi-threaded server (we are very early in the project, trying to uncover some risks), and I want to send data using XML. The class ServerAdapter is supposed to connect to the server...
3
by: Alur | last post by:
Changing the current directory with the help of dialog window(MFC app) We can change directory with the help of the following code: CFileDialog m_ldFile(TRUE);...
3
by: pramodrepaka | last post by:
I am using adodb with the help of oracle while printing the data report prints multiple rows but I want a selected row to be printed in the data report. Please help me if any one One more question...
1
by: jsjl | last post by:
Hi Following code(simple C#) does not work. I expect some utf-8 Korean strings in output (or debugger screen). What am I missing? Please help me. Thanks! jsjl ---- *code*
1
by: pramodrepaka | last post by:
i am not able to add records with the help of ADODB. what is the problem i am not able to understand please help me. this is the code i written In General Declaration Dim cn As New...
1
by: aberry | last post by:
I am facing an error on Unicode decoding of path if it contain a folder/file name starting with character 'u' >>> fp = "C:\\ab\\anil" >>> unicode(fp, "unicode_escape") u'C:\x07b\x07nil' >>> fp...
1
by: perhapscwk | last post by:
a textbox with character like ", how to insert it to database? when form submit, it seem the insert data to database is okay but it skip everything after the character ", why? thanks.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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: 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...

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.