French Characters in XML Document...Somewhat Urgent.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: French Characters in XML Document...Somewhat Urgent.

  1. #1
    Daniel Wintschel Guest

    French Characters in XML Document...Somewhat Urgent.


    Hi,

    I have some XML files with multi-language (namely English and French) messages
    in them to be displayed to end users within a web application. I am using
    JDOM(b7) to read the XML files, and it chokes and dies when I add special
    french characters into the file.

    Is there a different encoding I can use to prevent this from happening? The
    error I am getting looks like the following:

    org.jdom.JDOMException: Error on line 1: Character conversion error: "Malformed
    UTF-8 char -- is an XML encoding declaration missing?" (line number may be
    too low).

    I get the same error whether the document encoding is UTF-8, or ISO-8859-1.

    Can someone please help?

  2. #2
    mario Guest

    Re: French Characters in XML Document...Somewhat Urgent.


    "Daniel Wintschel" <daniel@tantalus.com> wrote:
    >
    >Hi,
    >
    >I have some XML files with multi-language (namely English and French) messages
    >in them to be displayed to end users within a web application. I am using
    >JDOM(b7) to read the XML files, and it chokes and dies when I add special
    >french characters into the file.
    >
    >Is there a different encoding I can use to prevent this from happening?

    The
    >error I am getting looks like the following:
    >
    >org.jdom.JDOMException: Error on line 1: Character conversion error: "Malformed
    >UTF-8 char -- is an XML encoding declaration missing?" (line number may

    be
    >too low).
    >
    >I get the same error whether the document encoding is UTF-8, or ISO-8859-1.
    >
    >Can someone please help?



  3. #3
    Troels Nielsen Guest

    Re: French Characters in XML Document...Somewhat Urgent.


    I think the answer is: Save as Unicode.


    Read this:
    http://www.w3schools.com/xml/xml_encoding.asp

  4. #4
    Fredrik Guest

    Re: French Characters in XML Document...Somewhat Urgent.

    I had the same problem with UTF encodings and did get it to work with
    encoding ISO-8859-1 (or any -9). It worked as well with any of KOI8-R or
    EUC-JP (sorry my documentation is not updated yet...).

    Please do post any realut since I am most interested. The ISO-8859s should
    if I understand it correctly take all ASCII carracters, even those above 127
    like the french carracters?

    Fredrik Svensson

    "Daniel Wintschel" <daniel@tantalus.com> escribió en el mensaje
    news:3c5af92d$1@10.1.10.29...
    >
    > Hi,
    >
    > I have some XML files with multi-language (namely English and French)

    messages
    > in them to be displayed to end users within a web application. I am using
    > JDOM(b7) to read the XML files, and it chokes and dies when I add special
    > french characters into the file.
    >
    > Is there a different encoding I can use to prevent this from happening?

    The
    > error I am getting looks like the following:
    >
    > org.jdom.JDOMException: Error on line 1: Character conversion error:

    "Malformed
    > UTF-8 char -- is an XML encoding declaration missing?" (line number may be
    > too low).
    >
    > I get the same error whether the document encoding is UTF-8, or

    ISO-8859-1.
    >
    > Can someone please help?




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center