Re: [Zope3-dev] Bytes versus ASCII

2006-02-03 Thread Gary Poster
On Feb 3, 2006, at 4:00 AM, Egon Frerich wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gary Poster schrieb am 27.01.2006 21:40: On Jan 27, 2006, at 5:16 AM, Christian Theune wrote: Hi, (this is about zope.schema) I assumed that the fields Bytes and ASCII have some distinction.

Re: [Zope3-dev] Bytes versus ASCII

2006-02-03 Thread Egon Frerich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gary Poster schrieb am 27.01.2006 21:40: > > On Jan 27, 2006, at 5:16 AM, Christian Theune wrote: > >> Hi, >> >> (this is about zope.schema) >> >> I assumed that the fields Bytes and ASCII have some distinction. The >> ASCII field explicitly check

Re: [Zope3-dev] Bytes versus ASCII

2006-01-27 Thread Christian Theune
On Fri, 2006-01-27 at 15:40 -0500, Gary Poster wrote: > > Bytes however does a cast in fromUnicode(u) that does str(u). This > > will > > break if there are non-ascii characters in the unicode string. > > Effectively this makes it an ASCII field as well. > > > > However, I don't know enough about

Re: [Zope3-dev] Bytes versus ASCII

2006-01-27 Thread Gary Poster
On Jan 27, 2006, at 5:16 AM, Christian Theune wrote: Hi, (this is about zope.schema) I assumed that the fields Bytes and ASCII have some distinction. The ASCII field explicitly checks for every character to have an ordinal value lower than 127. Bytes however does a cast in fromUnicode(u) tha

[Zope3-dev] Bytes versus ASCII

2006-01-27 Thread Christian Theune
Hi, (this is about zope.schema) I assumed that the fields Bytes and ASCII have some distinction. The ASCII field explicitly checks for every character to have an ordinal value lower than 127. Bytes however does a cast in fromUnicode(u) that does str(u). This will break if there are non-ascii cha