[Zope3-dev] Re: unicode problems !?
Tres Seaver
tseaver at zope.com
Mon Oct 11 17:35:17 EDT 2004
Philipp von Weitershausen wrote:
> Bjorn Tillenius wrote:
>
>> On Sat, Oct 09, 2004 at 11:42:53AM +0200, Philipp von Weitershausen
>> wrote:
>>
>>> Files could grow an 'encoding' attribute that is updated by the
>>> editing view according to the encoding of the request.
>>> I think text/* files should still be editable; we should fix up the
>>> Bytes widget.
>>
>>
>>
>> Yes, adding an 'encoding' attribute is one option. Although I don't
>> understand what you mean by that it should be updated by the editing
>> view according to to request.
>>
>> Often when users upload files, the files will be encoded in an encoding
>> different from UTF-8.
>
>
> Why?
Because our views don't insist that the browser encode them that way?
And some browsers (not mentioning any names, AIYEEEEEEE!) seem to feel
free to upload text in random encodings, *without specifying the
encoding in the upload request*, in cases where the originating form was
lenient / silent about the expected encoding.
> The user writes some chinese text into the text box. The user doesn't
> care about an encoding at that point. The user just wants to enter text
> in a textarea. The view should deduce the encoding from the request.
We *can't* deduce it if the browser cheats.
> If you upload a non "text/*" file, yes, then you should be required to
> specify an encoding. But then you won't be shown a textarea anyway.
>
>> The File must also use its 'encoding' attribute to set the encoding of
>> the response.
>
>
> But of course :)
Tres.
--
===============================================================
Tres Seaver tseaver at zope.com
Zope Corporation "Zope Dealers" http://www.zope.com
More information about the Zope3-dev
mailing list