[Zope3-dev] Re: [Zope3-checkins] CVS: Zope3/src/zope/app/content - folder.py:1.3

R. David Murray rdmurray+dated+1044669701.7f99fe@bitdance.com
Sun, 02 Feb 2003 21:01:39 -0500


My, it has taken me quite a while to get back to this.

Florent Guillaume <fg@nuxeo.com> writes:
>On Fri, 2003-01-17 at 20:18, R. David Murray wrote:
>> >> +        try: unicode(name)
>> >> +        except UnicodeDecodeError:
>> >> +            raise TypeError("Name may not contain non-7-bit-ascii codes")
[...]
>Corner case though: if the user has managed to set his default encoding
>to something like latin-1, you'll still store a non-unicode string with
>non-7-bit characters.
>
>How about a simple 
>    try:
>        name = unicode(name)
>    except UnicodeError:
>        ...

Thus forcing/storing all ids as unicode strings?  That might be
reasonable, but perhaps there is a design reason why ASCII ids
need to be allowed?

If not, I'll make the change.

--RDM