You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@abdera.apache.org by Io...@gmx.de on 2007/09/03 11:56:38 UTC
How to set encoding for atom-entries?
Hi!
I'm trying to use an abdera-client-0.22 to create an <entry> on an
atom-server.
How can I set the appropriate encoding of the <entry>-element and its children (e.g. <title> or <category>)? I need UTF-8.
I've seen, that one can distinguish between text, html and xhtml, but
I want text encoded with UTF-8. (e.g. <title type="text">äöü</title>)
Maybe one can point me in the right direction?
Regards,
Herbert
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
Re: How to set encoding for atom-entries?
Posted by Io...@gmx.de.
Hi James!
> Abdera uses UTF-8 by default. If you want to use something else, you'd
> set it when serializing, e.g.
I definitly want UTF-8.
Then something goes wrong in my setup.
I have an <entry>-element, that has got a <title>-element.
(<title type="text>some unicode-characters</title>.)
If I leave the content of the <title>-element plain old ascii, the posting of this element to a server is working.
If I put some UTF-8-characters in the content of the title-element,
the server responds with HTTP 400 Bad Request...*hmmm*
Reading of elements with unicode-characters seems to work.
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
Re: How to set encoding for atom-entries?
Posted by Chris Berry <ch...@gmail.com>.
There is no 0.3 -- you must use the svn trunk (0.3.0-SNAPSHOT),
which is not stable -- at least, API-wise.
I am using it, and recently did a svn up. And since my last update,
many of the user-facing classes have been refactored and repackaged.
Don't get me wrong. I'm not complaining. If you use SNAPSHOTs you
must be prepared for this.
But if you want stability, I would wait for a frozen 0.3
My $02.
Cheers,
-- Chris
On Sep 3, 2007, at 10:38 AM, Iops@gmx.de wrote:
>
> -------- Original-Nachricht --------
>> Btw, FWIW, I'd recommend moving up to 0.3.0 if possible.
>
> I will try.
>
> Is it as stable as 0.22?
> --
> Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
> Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
S'all good --- chriswberry at gmail dot com
Re: How to set encoding for atom-entries?
Posted by Io...@gmx.de.
-------- Original-Nachricht --------
> Btw, FWIW, I'd recommend moving up to 0.3.0 if possible.
I will try.
Is it as stable as 0.22?
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
Re: How to set encoding for atom-entries?
Posted by James M Snell <ja...@gmail.com>.
Abdera uses UTF-8 by default. If you want to use something else, you'd
set it when serializing, e.g.
OutputStreamWriter w = new OuputStreamWriter(System.out, "utf-16");
entry.getDocument().setCharset("utf-16");
entry.getDocument().writeTo(w);
Btw, FWIW, I'd recommend moving up to 0.3.0 if possible.
- James
Iops@gmx.de wrote:
> Hi!
>
> I'm trying to use an abdera-client-0.22 to create an <entry> on an
> atom-server.
>
> How can I set the appropriate encoding of the <entry>-element and its children (e.g. <title> or <category>)? I need UTF-8.
>
> I've seen, that one can distinguish between text, html and xhtml, but
> I want text encoded with UTF-8. (e.g. <title type="text">äöü</title>)
>
> Maybe one can point me in the right direction?
>
> Regards,
>
> Herbert
>
>
>
>