<html><body>
<p>New issue 209: Improper display of locale Ru <a href="https://bitbucket.org/conservancy/kallithea/issues/209/improper-display-of-locale-ru">https://bitbucket.org/conservancy/kallithea/issues/209/improper-display-of-locale-ru</a></p>
<p>Evgeniy Bondarenko:</p>
<p>When change string config file, from: ``` #!bash</p>
<p>default_encoding = utf8 ```</p>
<p>to</p>
<p>``` #!bash</p>
<p>default_encoding = ru_RU.utf8 ```</p>
<p>I have error below, but locale installed in OS. How to fix the incorrect display of the locale in the web interface?</p>
<p>``` #!python</p>
<p>2016-04-13 14:32:43.248 INFO [kallithea.model] initializing db for sqlite:////kallithea/config/kallithea.db?timeout=60 2016-04-13 14:32:43.249 INFO [kallithea.lib.auth] getting information about all available permissions Traceback (most recent call last):</p>
<pre>File "/usr/local/bin/paster", line 11, in <module>
sys.exit(run())
File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 102, in run
invoke(command, command_name, options, args[1:])
File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/usr/local/lib/python2.7/dist-packages/paste/script/command.py", line 236, in run
result = self.command()
File "/usr/local/lib/python2.7/dist-packages/paste/script/serve.py", line 284, in command
relative_to=base, global_conf=vars)
File "/usr/local/lib/python2.7/dist-packages/paste/script/serve.py", line 329, in loadapp
**kw)
File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
return context.create()
File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
return self.object_type.invoke(self)
File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
return fix_call(context.object, context.global_conf, **context.local_conf)
File "/usr/local/lib/python2.7/dist-packages/paste/deploy/util.py", line 55, in fix_call
val = callable(*args, **kw)
File "/kallithea/kallithea/kallithea/config/middleware.py", line 56, in make_app
config = load_environment(global_conf, app_conf)
File "/kallithea/kallithea/kallithea/config/environment.py", line 117, in load_environment
repos_path = make_ui('db').configitems('paths')[0][1]
File "/kallithea/kallithea/kallithea/lib/utils.py", line 368, in make_ui
ui_val = safe_str(ui_.ui_value)
File "/kallithea/kallithea/kallithea/lib/utils2.py", line 264, in safe_str
return unicode_.encode(enc)</pre>
<p>LookupError: unknown encoding: ru_RU.utf8 ```</p>
<p>``` #!bash</p>
<p># locale -a C C.UTF-8 POSIX en_US.utf8 ru_RU.utf8</p>
<p># dpkg-reconfigure locales Generating locales…</p>
<pre>en_US.UTF-8... up-to-date
ru_RU.UTF-8... up-to-date</pre>
<p>Generation complete. ```</p>
<p>System:</p>
<p>``` #!python</p>
<p>Kallithea version:</p>
<pre>0.3.1 Check for updates</pre>
<p>Kallithea configuration file:</p>
<pre>/kallithea/config/kallithea.ini</pre>
<p>Python version:</p>
<pre>2.7.6</pre>
<p>Platform:</p>
<pre>Linux-3.13.0-77-generic-x86_64-with-Ubuntu-14.04-trusty</pre>
<p>Версия Git:</p>
<pre>1.9.1</pre>
<p>Git path:</p>
<pre>git</pre>
<p>Upgrade info endpoint:</p>
<pre>Note: please make sure this server can access this URL.</pre>
<p>Python Packages amqplib 1.0.2 anyjson 0.3.3 argparse 1.2.1 Babel 1.3 Beaker 1.6.4 celery 2.2.10 chardet 2.0.1 colorama 0.2.5 decorator 4.0.9 docutils 0.11 dulwich 0.9.9 FormEncode 1.2.6 funcsigs 0.4 html5lib 0.999 Kallithea 0.3.1 kombu 1.5.1 Mako 1.0.0 Markdown 2.2.1 MarkupSafe 0.23 mercurial 3.7.2 mock 1.3.0 MySQL-python 1.2.5 nose 1.3.7 Paste 2.0.3 PasteDeploy 1.5.2 PasteScript 2.0.2 pbr 1.8.1 pip 8.1.1 psycopg2 2.6.1 py-bcrypt 0.4 Pygments 2.1.3 Pylons 1.0.2 pyparsing 1.5.7 Python 2.7.6 python-dateutil 1.5 python-ldap 2.4.10 pytz 2016.1 repoze.lru 0.6 requests 2.2.1 Routes 1.13 setuptools 20.3 simplejson 3.8.2 six 1.10.0 SQLAlchemy 0.7.10 Tempita 0.5.2 urllib3 1.7.1 URLObject 2.3.4 waitress 0.8.8 WebError 0.13 WebHelpers 1.3 WebOb 1.1.1 WebTest 1.4.3 wheel 0.24.0 Whoosh 2.5.7 wsgiref 0.1.2</p>
<p>```</p>
<img src="http://link.bitbucket.org/wf/open?upn=7V-2FmRl-2BatdmBwUBFXbsB13NVJlEXqBigXyxfn0HY8gb734ofWR-2Fbbq5jwybzy1EM9FjA4jyXV4mPCMFVtj7sNZ2UH-2FBpgUUwYOI9INeTRkKd4MrIcI1VTXTpEmjMixAfJtAaA4fJRwhBwEQXdn-2BT07iaJmxmzq9Ih6blNt13R5DaXRSOZXkYFRBPR8o26oH1S27ROuFpEcgKWdboGeWBe9fvcAq8b3CJclJ5d4eadpUfWzdRCfHwckNl8IwuWHPr" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;"/>
</body></html>