I don't think so - you said to encode the document in 'utf-8', which is perfectly capable of representing the � as as a 2 byte character - which will be rendered by a utf-8 capable editor as �. You didn't say how you were looking at your 'output document' - i.e., if you use an program that assumes (or figures out) the document is utf-8 then it will look fine while a program limited to 8bit characters would show 2 characters instead of 1
So I don't think there is no reason for the marshaller to encode it as an entity (ü) - as opposed to a string with, e.g., a < which must be represented using its entity(<) otherwise the xml would not be well formed. -----Original Message----- From: Adrian Klingel [mailto:[EMAIL PROTECTED] Sent: Friday, June 03, 2005 10:33 AM To: [email protected] Subject: [castor-user] [XML] - Umlaut characters not encoded Hello, I'm getting information from a database and spitting it out into a file. I'm creating a Marshaller object, setting the encoding, and not marshalling as a document. Like this: FileWriter fw = new FileWriter(file); Marshaller m = new Marshaller(fw); m.setEncoding("UTF-8"); m.setMarshalAsDocument(false); The "item" object below is an instance of a class that is Castor-generated from an XML Schema. Inside a loop, I do this: item.assemble(); m.marshal(item); An example of data inside the "item" object is the value: Engranaje de Cig�e�al And this is put into "item" like this: item.setData("Engranaje de Cig�e�al"); But in my output document it looks like this: <Item>Engranaje de Cig�e�al</Item> But I don't know how to encode those special characters. Shouldn't that "�" be a "ü"? I am probably missing something, I appreciate any help you can offer. Adrian G. Klingel ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

