I have experienced this also, the problem may be that you must open the File stream with an encoding.

I use the methods below and just call

OutputStreamWriter osw = CreateOutputWriter( new FileOutputStream ("path"), "UTF-8" );

xmlserializer.writeXML( xmlRoot, osw );

osw.close();


/** takes a stream and wraps it for an encoded writer. Defaults to UTF-8 */
public OutputStreamWriter CreateOutputWriter(
        OutputStream stream,
        String encoding ) throws UnsupportedEncodingException
{
        String enc = (encoding == null ? "UTF-8" : encoding);
        return new OutputStreamWriter(stream, enc);
}

/** takes a stream and wraps it for an encoded reader. Defaults to UTF-8 */
public InputStreamReader CreateInputReader(
        InputStream stream,
        String encoding ) throws UnsupportedEncodingException
{
        String enc = (encoding == null ? "UTF-8" : encoding);
        return new InputStreamReader(stream, enc);
}



On 13-Oct-06, at 9:37 AM, Amedeo Mantica wrote:

Hello,

I'm sorry, but after a lot of investigations I (with your help) discovered that the problem resides in the data source.

Data source in Openbase UTF-8 encoded.

In web / html all accented works ok.
serializing in XML than saving to a file seem to be ok, but is bad.

there fore XML -> PDF is also bad.

now I have another, but may be small, problem... the carriage return is written out in XML as \u000d... so I have pdf with written \u000d instead of correct carriage return.

Diluizione: Prodotto pronto all'uso<ch>\u000d</ch>
<ch>\u000d</ch>
Conservazione: Il mat

after SilmpleTrasformation:

Diluizione: Prodotto pronto all'uso\u000d
\u000d
Conservazione: Il mat

Regards
Amedeo
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/daspinall% 40ticoon.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to