Jim Fulton wrote:
Oh, that. Waaaaa. Christian Theune almost had this fixed last year
This is also related to a File object refactoring that someone *almost*
What kind of refactoring ? Is it already in the trunk ?
I did not changed anything to the IFile interface. Text or not, the
content is always stored on the Bytes field.
I don't know what your solution looks like at this point. But I'll note:
- File objects store Bytes data. Not unicode.
This is not what I understood of the description of issue 302 on
- For text content, File object's want to keep track of an
My solution just convert the text input to UTF-8 before for storage in
the Bytes field. A UTF-8 specific widget (very similar to the future
ASCIIAreaWidget) is used in the edit form. When the text file is
displayed, the content is converted to unicode and afterwards to the
preferred encoding of the user's browser. This works quite well on my
Resolving issue 302 is on the todo list for 3.1. However, one could take
advantage of this future refactoring in order to merge I18NFile and File
into a single package. After all, a non-i18n file is just a i18n file
with a default language...
I expect that, in the long term (3.2?), we'll need to totally redo
Files to make then sane and to take advantage of ZODB Blobs.
BTW, I18NFile is also broken because of encoding problems. I was not
able to enter non-ASCII characters in the text area... That's pretty
problematic for a I18N-aware product :-D
Zope3-dev mailing list