Default IUserPreferredCharsets' use of Zope 2's request problematic
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The IUserPreferredC
header_present = 'HTTP_ACCEPT_
However, with Zope 2's request will return '' (the empty string) for any header that starts with 'HTTP_', see ZPublisher.
Ultimately, this results in the HTTPCharsets.
To understand this problem better, look at Products.
This problem has come to light by Plone3.
zope.formlib needs unicode decoded field object, and Products. Five.browser. decode. processInputs provides unicode converted request.form. Charset provided by IUserPreferredC harsets. getPreferredCha rsets() , and getPreferredCha rsets() decide charset by HTTP_ACCEPT_ CHARSET. If HTTP_ACCEPT_CHARSET was not sent from client browser (IE6,7, Safari), getPreferredCha rsets() return iso-8859-1.
I think use default- zpublisher- encoding value if HTTP_ACCEPT_CHARSET was not provided.
references::
- https:/ /bugs.launchpad .net/zope2/ +bug/143873 dev.plone. org/plone/ ticket/ 8185
- http://