Re: [Zope-dev] allowable object ids

2002-12-12 Thread Florent Guillaume
Dieter Maurer  <[EMAIL PROTECTED]> wrote:
>  > I'm
>  > currious, why aren't arbitrary characters allowed in object ids?
> I cannot tell you precisely.
> 
>   My guess:
> 
> It was an initial simplification to avoid URL quoting at
> many places. With the given restriction, you can use
> ids directly in URLs -- no need to escape parts of them.
> 
> I hope (and expect) that the restriction will be dropped
> when Zope becomes unicode based.
> Not because I miss characters like "+?/..." but because
> international letters should be allowed in ids.

It will be the case in Zope 3 (only "/" will be forbidden in ids (=names)).
For Zope 2 I strongly doubt we'll have full unicode ids.

Florent
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] allowable object ids

2002-11-24 Thread Jamie Heilman
> These are interpreted by the browser; they will not reach the Web server.

Well they aren't interpreted by telnet which is what I was using to
test.  :p  I'm not that green.

> (However, "un/restrictedTraverse" interprets it in the same way).

Which I did find interesting.
 
>  > You can't create objects with ids containing +
>  > or % or a host of other characters though (and btw the error message
>  > you get when you try is horrid, those characters are not illegal in
>  > URLs
> "%" is illegal (unescaped) because it is the escape
> character.

ok its illegal _unescaped_, still, you see what I'm driving at

>   My guess:
> It was an initial simplification to avoid URL quoting at
> many places. With the given restriction, you can use
> ids directly in URLs -- no need to escape parts of them.
> 
> I hope (and expect) that the restriction will be dropped
> when Zope becomes unicode based.
> Not because I miss characters like "+?/..." but because
> international letters should be allowed in ids.

That was my hunch as well, and yeah, if that is the only reason, I
hope it is dropped too.  It strikes me as a bit of a bodge, but a
forgivable one if there was something more sinister afoot.

-- 
Jamie Heilman   http://audible.transient.net/~jamie/
"I was in love once -- a Sinclair ZX-81.  People said, "No, Holly, she's 
 not for you." She was cheap, she was stupid and she wouldn't load 
 -- well, not for me, anyway."  -Holly

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] allowable object ids

2002-11-24 Thread Dieter Maurer
Jamie Heilman writes:
 > Turns out you can create objects with an id of . or .. although you
 > can't access them.
That's because they have a special interpretation in
URL references (the kind of things browsers are handling).

  "." means "ignore me", and ".." means "drop the latest URL segment".
  This is the same meaning as they have in widely used file
  systems (on Unix and Windows).

These are interpreted by the browser; they will not reach the Web server.
(However, "un/restrictedTraverse" interprets it in the same way).

 > You can't create objects with ids containing +
 > or % or a host of other characters though (and btw the error message
 > you get when you try is horrid, those characters are not illegal in
 > URLs
"%" is illegal (unescaped) because it is the escape
character.

 > I'm
 > currious, why aren't arbitrary characters allowed in object ids?
I cannot tell you precisely.

  My guess:

It was an initial simplification to avoid URL quoting at
many places. With the given restriction, you can use
ids directly in URLs -- no need to escape parts of them.

I hope (and expect) that the restriction will be dropped
when Zope becomes unicode based.
Not because I miss characters like "+?/..." but because
international letters should be allowed in ids.


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] allowable object ids

2002-11-23 Thread Andreas Kostyrka
Am Sam, 2002-11-23 um 18.30 schrieb Jamie Heilman:
> Turns out you can create objects with an id of . or .. although you
Well, you can access these properties/objects from DTML/Python. Not from
ZPublisher (the URL->Object Request Broker).
 
> can't access them.  (which is to say I couldn't figure out how, though
> I didn't try ZServer standalone and I suppose apache might be doing
> something to the URI)  You can't create objects with ids containing +
> or % or a host of other characters though (and btw the error message
> you get when you try is horrid, those characters are not illegal in
> URLs, illegal in the zope object model perhaps, but not URLs).  I'm
> currious, why aren't arbitrary characters allowed in object ids?
Well, because of the implementation details, it is not possible to allow
certain ids (things that start with '_' or 'aq_', etc.).

Why % is not allowed I can only guess at, but I'd assume that the
authors tried to get "sane" ids. It's a bit like the Unix Filesystem. By
definition it allows all characters except '\0' and '/'. Still it's
rather stupid and inconvienent to use exotic characters.

By the way, you can look
Zope/lib/python/OFS/ObjectManager.py:checkValidId (line 49) to see what
is allowed and what not.

Andreas


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )