[jdev] Escaping JID using XEP-0106

Sergei Golovan sgolovan at nes.ru
Wed Jun 27 07:56:40 CDT 2007

On 6/27/07, Michal 'vorner' Vaner <vorner at ucw.cz> wrote:
> Hello
> On Wed, Jun 27, 2007 at 01:11:03PM +0200, Norman Rasmussen wrote:
> >  On 6/27/07, Sergei Golovan <sgolovan at nes.ru> wrote:
> > >
> > > You're right. And the question is: "How to escape it? Can escaping be
> > > done unambiguously?"
> >
> >
> >  Yes, but only if you already know the split.
> Is there a way the server part could contain @? I hope a domain name
> can't contain it. I would take the last @ as the actual separator and
> leave all the before as just part of the node (same as with email, where
> you can have address like @@host.com, where the local name on host is
> really @).

The last @ may be in a resource part.

> Do you think there may be a problem with this approach?

Valig JIDs are always split into three parts unambiguously. As far as
I thought, XEP-0106 purpose is to allow invalid JIDs to be shown to a
user (hiding real complicated escaped JID). But it seems to fail in
this. So, let this XEP serve another goal - interoperability between
XMPP network and the others.

Sergei Golovan

More information about the JDev mailing list