users
[Top] [All Lists]

RE: [cinjug-users] XML/Java Question

To: <users@xxxxxxxxxx>
Subject: RE: [cinjug-users] XML/Java Question
From: "Scott T Weaver" <sweaver@xxxxxxxxxxxxxxx>
Date: Thu, 10 Nov 2005 12:40:39 -0500
Delivered-to: mailing list users@cinjug.org
In-reply-to: <B3C1814636F055418325EF3C367CD4D40238C883@namail2.na.ipsos>
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Thread-index: AcXmG4GexzWkHhHOQjGpQ7zXqytPNgAAWa9A
Hi Brian,

1.  Make sure you have "<?xml version="1.0" encoding="UTF-8"?>" defined for
your encoding in your file.
2.  Are you sure that the special characters are actually UTF-8 characters
and not some goofy windows/esoteric character encoding?  I have seen issue
arise when copying and pasting from Word documents, etc.  One thing that
always got me is that Eclipse?s default char encoding on windows *IS NOT*
UTF-8.  If you are using Eclipse to work with your XML (or any other text
for that matter), you should adjust the general editor settings like so:

Window > Preferences > General > Editors: Change the ?Text File Encoding?
from ?Default (Cp1252)? to ?Other? and select ?UTF-8? from the list.  This
should solve any cutting/pasting issues you might run into as Eclipse seems
to be able to automatically convert into UTF-8 when set up correctly.

Some things that may help us better understand your issue.

- Might be helpful if you posted the specific error you are getting.
- Does this happen on reading from XML, writing to XML or both?

Hth,
-Scott

________________________________________
From: Brian Engel [mailto:Brian.Engel@xxxxxxxxxxxx] 
Sent: Thursday, November 10, 2005 12:24 PM
To: users@xxxxxxxxxx
Subject: [cinjug-users] XML/Java Question

 
I am running into a problem where I have special (international) characters
in attribute for an XML tag.
 
i.e. <MyTag theAttribute="Señor Gómez" />
 
I presume I need to encode the string somehow, how can I do this in Java? 
 
 
Thanks for any help...
 
 
Brian Engel
 
 


<Prev in Thread] Current Thread [Next in Thread>
  • XML/Java Question, Brian Engel
    • RE: [cinjug-users] XML/Java Question, Scott T Weaver <=