users
[Top] [All Lists]

RE: [cinjug-users] XML/Java Question

To: "Scott T Weaver" <sweaver@xxxxxxxxxxxxxxx>, <users@xxxxxxxxxx>
Subject: RE: [cinjug-users] XML/Java Question
From: "Brian Engel" <Brian.Engel@xxxxxxxxxxxx>
Date: Thu, 10 Nov 2005 15:21:47 -0500
Delivered-to: mailing list users@cinjug.org
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Thread-index: AcXmG4GexzWkHhHOQjGpQ7zXqytPNgAAWa9AAAXGm7A=
Thread-topic: [cinjug-users] XML/Java Question
Actually that was the problem my response did not include the xml descriptor. 
UTF-8 doesn't work but iso-8859-1 (Latin 1) does work so  by adding this to the 
header for the xml document the AJAX browser object processes it fine now. 

<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>


Thanks for pointing me in the right direction...




-----Original Message-----
From: Scott T Weaver [mailto:sweaver@xxxxxxxxxxxxxxx] 
Sent: Thursday, November 10, 2005 12:41 PM
To: users@xxxxxxxxxx
Subject: RE: [cinjug-users] XML/Java Question

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
 
 


---------
You may unsubscribe from this mailing list by sending a blank email addressed 
to:
users-unsubscribe@xxxxxxxxxx

--
Find additional help by sending a blank email addressed to:
users-help@xxxxxxxxxx



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