Mercurial > kallithea
comparison docs/setup.rst @ 7327:9937ae52f167
hg: set encoding to utf-8 by default to always show unicode characters correctly
Unicode characters would be shown as '?' if Kallithea was launched in a LANG=C
environment (or similar).
The problem could be solved by setting HGENCODING before launching Kallithea or
before importing Mercurial. These are often not good solutions.
Instead, introduce a hgencoding config setting that triggers monkey patching of
Mercurial.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sat, 09 Jun 2018 16:28:33 +0200 |
parents | d24051ce961c |
children | d5eaa70e0f2a |
comparison
equal
deleted
inserted
replaced
7326:abaf8e1033a6 | 7327:9937ae52f167 |
---|---|
630 This is configurable as ``default_encoding`` in the .ini file. | 630 This is configurable as ``default_encoding`` in the .ini file. |
631 This affects many parts in Kallithea including user names, filenames, and | 631 This affects many parts in Kallithea including user names, filenames, and |
632 encoding of commit messages. In addition Kallithea can detect if the ``chardet`` | 632 encoding of commit messages. In addition Kallithea can detect if the ``chardet`` |
633 library is installed. If ``chardet`` is detected Kallithea will fallback to it | 633 library is installed. If ``chardet`` is detected Kallithea will fallback to it |
634 when there are encode/decode errors. | 634 when there are encode/decode errors. |
635 | |
636 The Mercurial encoding is configurable as ``hgencoding``. It is similar to | |
637 setting the ``HGENCODING`` environment variable, but will override it. | |
635 | 638 |
636 | 639 |
637 Celery configuration | 640 Celery configuration |
638 -------------------- | 641 -------------------- |
639 | 642 |
892 Example WSGI dispatch script: | 895 Example WSGI dispatch script: |
893 | 896 |
894 .. code-block:: python | 897 .. code-block:: python |
895 | 898 |
896 import os | 899 import os |
897 os.environ["HGENCODING"] = "UTF-8" | |
898 os.environ['PYTHON_EGG_CACHE'] = '/srv/kallithea/.egg-cache' | 900 os.environ['PYTHON_EGG_CACHE'] = '/srv/kallithea/.egg-cache' |
899 | 901 |
900 # sometimes it's needed to set the current dir | 902 # sometimes it's needed to set the current dir |
901 os.chdir('/srv/kallithea/') | 903 os.chdir('/srv/kallithea/') |
902 | 904 |