[Zope3-dev] Re: unicode problems !?
Philipp von Weitershausen
philipp at weitershausen.de
Tue Oct 12 02:13:34 EDT 2004
Bjorn Tillenius wrote:
> On Mon, Oct 11, 2004 at 11:00:09PM +0200, 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?
>
>
> Are you asking why the uploaded file is not UTF-8? Have you ever heard
> of a company called Microsoft? Can you show me a MS Windows system which
> defaults to UTF-8?
Sorry, ignorant me :).
> At this point I'm not talking about creating an empty file, and enter
> some text in a text box. I'm talking about creating a file, then upload
> some local file. For example this e-mail, containing the letter 'ö'. Now
> this e-mail isn't encoded using UTF-8...
>
>
>>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.
>
>
> Why do you want to deduce the encoding? So if I edit the file using
> Latin-1, it gets encoded as Latin-1. The you come and edit the file as
> well, using UTF-8. How do you suggest that would work? Zope gets what's
> in the text box as unicode in both cases already.
>
> In other words, today the user doesn't have to care about the encoding
> when he inputs text in a text box, that works already. (By deducing the
> encoding from the request)
Right. Ok, so the user should just have to provide an encoding with
which the reponse body will be encoded.
>>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.
>
> Now you lost me, why do you want an encoding for non text files?
Lost myself there ;)
Philipp
More information about the Zope3-dev
mailing list