hi everybody,
I would like to parse an xml file containing some accentuated
characters like è. This causes my java program to throw this error :
file:/c:/dxl/Abbink.xml; Line 216; Column 26
XSL Error: Could not parse c:\dxl\Abbink.x ml document!
XSL Error: SAX Exception
Invalid UTF-8 code. (bytes: 0xffffffe9 0x20)
How can I take this in account ?
Thanks in advance
Ndeye 3 7958
Rule of thumb:
- if you specify UTF-8 encoding in xml declaration i.e. encoding="UTF-8"
then
you must SAVE your document in UTF-8.
- Alternatively you can specify encoding="ISO-8859-1" in xml declaration for
example and then you can save your doc in plain latin1 (same as ISO-8859-1)
encoding - this should work for you. Choosing UTF-8 at saving stage is an
option
too of course.
with respect,
Toni Uusitalo
"Ndeye" <ns******@hotma il.com> wrote in message
news:93******** *************** ***@posting.goo gle.com... hi everybody,
I would like to parse an xml file containing some accentuated characters like è. This causes my java program to throw this error :
file:/c:/dxl/Abbink.xml; Line 216; Column 26 XSL Error: Could not parse c:\dxl\Abbink.x ml document! XSL Error: SAX Exception Invalid UTF-8 code. (bytes: 0xffffffe9 0x20)
How can I take this in account ?
Thanks in advance Ndeye
Sorry I didn't mention that if you don't specify any encoding,
in xml it defaults to UTF-8.
That's a common mistake to SAVE a file in latin1 (file that's including
characters above ASCII 127) and not to specify ISO-8859-1, then parser tries
to read the file in UTF-8 (default) and fails of course.
with respect,
Toni Uusitalo
"Toni Uusitalo" <to************ **@luukkudot.ko m> wrote in message
news:LL******** *******@reader1 .news.jippii.ne t... Rule of thumb: - if you specify UTF-8 encoding in xml declaration i.e. encoding="UTF-8" then you must SAVE your document in UTF-8. - Alternatively you can specify encoding="ISO-8859-1" in xml declaration
for example and then you can save your doc in plain latin1 (same as
ISO-8859-1) encoding - this should work for you. Choosing UTF-8 at saving stage is an option too of course.
with respect, Toni Uusitalo
"Ndeye" <ns******@hotma il.com> wrote in message news:93******** *************** ***@posting.goo gle.com... hi everybody,
I would like to parse an xml file containing some accentuated characters like è. This causes my java program to throw this error :
file:/c:/dxl/Abbink.xml; Line 216; Column 26 XSL Error: Could not parse c:\dxl\Abbink.x ml document! XSL Error: SAX Exception Invalid UTF-8 code. (bytes: 0xffffffe9 0x20)
How can I take this in account ?
Thanks in advance Ndeye
You're right
I specified utf-8 and it works
Thanks
"Toni Uusitalo" <to************ **@luukkudot.ko m> wrote in message news:<fT******* *******@reader1 .news.jippii.ne t>... Sorry I didn't mention that if you don't specify any encoding, in xml it defaults to UTF-8.
That's a common mistake to SAVE a file in latin1 (file that's including characters above ASCII 127) and not to specify ISO-8859-1, then parser tries to read the file in UTF-8 (default) and fails of course.
with respect, Toni Uusitalo
"Toni Uusitalo" <to************ **@luukkudot.ko m> wrote in message news:LL******** *******@reader1 .news.jippii.ne t... Rule of thumb: - if you specify UTF-8 encoding in xml declaration i.e. encoding="UTF-8" then you must SAVE your document in UTF-8. - Alternatively you can specify encoding="ISO-8859-1" in xml declaration for example and then you can save your doc in plain latin1 (same as ISO-8859-1) encoding - this should work for you. Choosing UTF-8 at saving stage is an option too of course.
with respect, Toni Uusitalo
"Ndeye" <ns******@hotma il.com> wrote in message news:93******** *************** ***@posting.goo gle.com... hi everybody,
I would like to parse an xml file containing some accentuated characters like è. This causes my java program to throw this error :
file:/c:/dxl/Abbink.xml; Line 216; Column 26 XSL Error: Could not parse c:\dxl\Abbink.x ml document! XSL Error: SAX Exception Invalid UTF-8 code. (bytes: 0xffffffe9 0x20)
How can I take this in account ?
Thanks in advance Ndeye
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jean-Marc Molina |
last post by:
Hello,
I'm trying to generate a RSS newsfeed using the DOM XML functions. However I
can't find a way to use accentuated characters. I even tried to specify a
character encoding set but it doesn't solve the problem.
Error I get :
XML Parsing Error: not well-formed
Location: news.php?action=syndicate&format=rss2
Line Number 1, Column 102:<?xml version="1.0" encoding="ISO-8859-15"?><rss
|
by: mikeyjudkins |
last post by:
I have an XML file containing localized strings in 9 languages, encoded
in Unicode (UTF-8). Im trying to parse this XML document via XSLT
(Apache Xalan) to selectively render localized strings depending on a
users selected language.
The problem Im running into is that when the XML document is sent
through the XSLT stylesheet, all European special characters (such as
umlauts, accents, etc) are converted to html character entities (as...
|
by: Cesar Ronchese |
last post by:
Hello, All!
I'm working with accentuated characters in my XML files, and I have found
problems to load and save it.
First, for this case, I always have my XML in memory, and I load it via
LoadXML (please, ignore incorrect concatenations for this sample):
Dim cXml As New Xml.XmlDocument
|
by: Marcos Ribeiro |
last post by:
Hi
I'm trying to read a textfile using System.IO.StreamReader, but all
accentuated characters are skiped.
Why's that? There is any workaround?
Thanks
Marcos
|
by: jcdperf |
last post by:
Hello,
I have small problems while reading of text files containing
accentuated characters. (like é è à ç ...). I use this basic code :
Dim sr As StreamReader
Try
sr = New StreamReader(sFichier)
Dim sLine As String
| |
by: Wim Cossement |
last post by:
Hello,
I was wondering if there are a few good pages and/or examples on how to
process form data correctly for putting it in a MySQL DB.
Since I'm not used to using PHP a lot, I already found out that
addslashes() can be used escape some characters, but I'm having some
more problems with for instance ä, å and µ (since the text is scientifical)
Now some people also throw in htmlspecialchars() to convert those to
HTML entities, but some...
|
by: DierkErdmann |
last post by:
Hi !
I know that this topic has been discussed in the past, but I could not
find a working solution for my problem: sorting (lists of) strings
containing special characters like "ä", "ü",... (german umlaute).
Consider the following list:
l =
For sorting the letter "Ä" is supposed to be treated like "Ae",
therefore sorting this list should yield
|
by: rafficabdullah |
last post by:
I need to select the records containing newline characters in them.The data may contain tab and spaces that should not come in the output.This can be done with regexp_like in oracle in 10g.but i need this in 9i.Can any one help me in this
Many Thanks in Advance
Raffic
|
by: themillenium |
last post by:
Hello!
I am trying to get an html page of urls containing special characters as %21,...
"%21" stands for "!",..
e.g.: http://en.wikipedia.org/wiki/Joan_R%C3%B6ell (this page was picked my random)
And I need these sites, and there are many sites containing these special characters...
I tried many variants of getting an html page...
Example 1:
requestHtml = WebRequest.Create(htmlUri);
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |