Thanks for your quick response... amazing!

  But I have to clear some points (sorry for haven't done this in my first
email):

1- When I said that:

"I get Español instead of Español.", I meant that I wanted to have
be able to see the letter that you can get with ALT+164 (I think my email has
an encoding issue also... ;)), and I don't know if I'm correct, but if declare
the encoding ISO-8859-1, I should be able to see the ALT+164 char when
marshalling, in fact I'm unmarshalling from a disk file that has this char
correct and the Java object's property generated from it are also correct.

2- The version of Castor I have is the one shippped with JBuilder and it hasn't
got the masrhaller.setEncoding() method, but the result should be the same,
right?

  So, after this 2 points, I'm still lost about how to solve this problem.


-----Original Message-----
From: Keith Visco [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 5:19 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Marshalling encoding




Federico Mesplet wrote:
> 
>   Hi, I've been wandering around the mailing list and found some help about
> this issue, but it seems code that work for others doesn't for me. I think I'm
> doing sth wrong. This is the code I found for masrhalling with different
> encoding:
> 
> OutputFormat format = org.exolab.castor.util.Configuration.getOutputFormat();
> format.setEncoding("ISO-8859-1");
> Serializer serializer = org.exolab.castor.util.Configuration.getSerializer();
> serializer.setOutputFormat(format);
> serializer.setOutputCharStream(w);
> 
> Marshaller marshaller = new Marshaller(serializer.asDocumentHandler());
> marshaller.marshal(i, w);

You can also use:

marshaller.setEncoding(...);

> 
> I get Español instead of Español.

I haven't checked this myself, but these might be equivalent, the hex
value F1 might equivalent to the name entity 'ntilde'.

--Keith

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev


------------------------------------
Mail.Ru - ������, ��������, �������!
------------------------------------

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to