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

XML international characters

Hello,

When parsing XML documents containing international characters, such as
the Norwegian characters Æ, Ø, Å, I get an exception in Python's SAX
module. What is the correct way to parse such characters in Python? I've
searched for methods to somehow escape the characters, without any luck
so far.
Thanks in advance,
Andreas

www.openrts.org - Python RTS game
Mar 10 '06 #1
1 1715
Andreas R. wrote:
When parsing XML documents containing international characters, such as
the Norwegian characters Æ, Ø, Å, I get an exception in Python's SAX
module. What is the correct way to parse such characters in Python? I've
searched for methods to somehow escape the characters, without any luck
so far.


The correct way is to provide correct XML. If you get a parse error,
it really means that there is an error in your XML file. Most likely,
the encoding of the characters is inconsistent with the declared
encoding. Notice that the default encoding of XML (in absence of a
declaration) is UTF-8.

Regards,
Martin
Mar 10 '06 #2

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

Similar topics

0
by: Ruslan Popov | last post by:
Hello, Is there a way to change encoding of a message created with CDO.Message, or otherwise send international characters (unicode) in Textbody? The messages I get now show question signs...
15
by: Steve | last post by:
Hi, I've been charged with investigating the possibilities of internationalizing our C++ libraries. std::strings are used all over the place, and unfortunately a mixture of...
12
by: laurenq uantrell | last post by:
Is there an easy way to loop through all rows and remove all international alphabet characters from a column in a table, for example remove German umlauts "ü" and convert them to a simple "u"....
1
by: Joerg | last post by:
I am in the process of creating an international GUI application with C# on ..NET1.1 (Win2k), which is supposed to implement a particular look/design. In order to achieve this, I plan amongst...
0
by: Elmo Watson | last post by:
I'm trying an example in the ASP.Net unleashed book, using a Treeview and an XML file The XML file came from a spit-out (for xml) of a query in the Northwind database, giving me Categories and...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.