[Zope3-dev] Re: Getting rid of ASCII schema field

Philipp von Weitershausen philipp at weitershausen.de
Mon Jan 19 03:08:29 EST 2004


Tres,

>> one last ward in the schema package remains: the ASCII field. Maybe 
>> there's a deeper reason for its existence, I certainly can't see it. 
>> 8-byte strings should be stored with the Bytes field. Morover, ASCII 
>> is totally equivalent to the Bytes field, so it doesn't even make a 
>> difference. The few times where it's used in the Zope 3 source I see 
>> no reason for not using Bytes.
>>
>> Unless someone has the mercy to enlighten me what ASCII could possibly 
>> be useful for, I will remove it next week :).
> 
> -1.  Using an ASCII field documents an intent to store only 
> "7-bit-clean" values in the string;  no characters > DEL (chr(127)) 
> should be allowed.  A number of applications exist which require such a 
> constraint (think RFC 822 headers, for instance).

Thanks for clearing that up. I hadn't thought of *7bit* ASCII... quite 
an anachronism that is!

> If, in fact, the ASCII field does not *enforce* that constraint, then we 
> should remedy that.

Yes. I won't probably be the last one stumbling over this... I will fix 
the docstring and enforce correct validation then.

Philipp





More information about the Zope3-dev mailing list