Issue #1038 resolved

Impruve quality of encoding.

guest avatarguest created an issue

Today I met one user-agent that understand just one encoding (Accept-Charset: windows-1251), and as result it received 406 error code from my App.

After some digging into possible solutions I come to following:

tools.encode.on = True
tools.encode.encoding = None
tools.encode.errors = 'replace'

But it have one serious defect - first codepage it try to convert to is iso-8859-1. So it have made serious impact on cyrillic text. I try to find better way to process encodings in this situation. See patch.

Comments (2)

  1. Robert Brewer

    I'm not sure what your patch is trying to achieve, or what behavior you'd like to see instead of the existing behavior. The attempt to send ISO-8859-1 is required by HTTP when "*" is not present in the Accept-Charset request header.

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.