-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
cgi uses the locale encoding for log files #85311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The cgi module provides undocumented feasibility for logging. cgi.log() formats log message and appends it to the log file with name specified by cgi.logfile if it was not empty before the first use of cgi.log(). One of problems is that it uses the locale encoding for log file. Therefore the result depends on the locale at the moment of the first use of cgi.log(). We can fix this by using some fixed encoding (UTF-8). Or maybe just remove this undocumented feature. |
I am for keeping this functionality. Unless others in this nosy list think otherwise. |
Which functionality?
I don't mind keeping the function, but if the file isn't already opened I think using UTF-8 is an appropriate choice. |
My bad. I meant cgi.log(), I pressed submit changes in a hurry. +1 for utf-8. |
Available options:
In all options except 2 cgi.log() needs to be documented and advertised as a new feature. And we should ask ourself: do we need this feature? Does it have advantages over the logging package? It was more visible in 2.0. But since adding __all__ in 2.1 (in e99d5ea) it is a hidden feature. |
+1 for removing. |
cgi.log()
. #25625Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: