{{{
env = LANG='en_US.UTF-8'
}}}
After trying to debug my configuration for hours, I found that line is
incorrect. Those quotes should be removed. The correct line is:
{{{
env = LANG=en_US.UTF-8
}}}
How to reproduce it:
* Ubuntu 16.04
* Python 3.5.2
* Django 1.9.8
* uwsgi 2.0.12-debian
And add the following lines to the settings.py:
{{{
import locale
import os
print(os.getenv('LANG', None))
print(locale.getlocale(), locale.getdefaultlocale())
print(locale.getpreferredencoding())
print(sys.getfilesystemencoding())
}}}
The broken configuration prints:
{{{
'en_US.UTF-8'
(None, None) ("'en_US", "UTF-8'")
ANSI_X3.4-1968
ascii
}}}
The correct one prints:
{{{
en_US.UTF-8
('en_US', 'UTF-8') ('en_US', 'UTF-8')
UTF-8
utf-8
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26941>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => navidkhn1
* needs_better_patch: => 0
* status: new => assigned
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/26941#comment:1>
Comment (by navidkhn1):
Pull Request Submitted. (#6970 )
--
Ticket URL: <https://code.djangoproject.com/ticket/26941#comment:2>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"9a5a789da2b53a9c19ea47130507ce26839eb008" 9a5a789d]:
{{{
#!CommitTicketReference repository=""
revision="9a5a789da2b53a9c19ea47130507ce26839eb008"
Fixed #26941 -- Corrected uwsgi "env = LANG=…" configuration in docs.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26941#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"7665a52161512a963e35fb314d830b59e94bc21d" 7665a521]:
{{{
#!CommitTicketReference repository=""
revision="7665a52161512a963e35fb314d830b59e94bc21d"
[1.8.x] Fixed #26941 -- Corrected uwsgi "env = LANG=…" configuration in
docs.
Backport of 9a5a789da2b53a9c19ea47130507ce26839eb008 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26941#comment:4>
Comment (by Tim Graham <timograham@…>):
In [changeset:"3ee1751a9907eeb1680e89a1e390717b28308231" 3ee1751a]:
{{{
#!CommitTicketReference repository=""
revision="3ee1751a9907eeb1680e89a1e390717b28308231"
[1.9.x] Fixed #26941 -- Corrected uwsgi "env = LANG=…" configuration in
docs.
Backport of 9a5a789da2b53a9c19ea47130507ce26839eb008 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26941#comment:5>
Comment (by Tim Graham <timograham@…>):
In [changeset:"ec6b3cc6e95fa1646a582b4f1fb78149179adc4a" ec6b3cc6]:
{{{
#!CommitTicketReference repository=""
revision="ec6b3cc6e95fa1646a582b4f1fb78149179adc4a"
[1.10.x] Fixed #26941 -- Corrected uwsgi "env = LANG=…" configuration in
docs.
Backport of 9a5a789da2b53a9c19ea47130507ce26839eb008 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26941#comment:6>