summaryrefslogtreecommitdiff
path: root/docs/ref/unicode.txt
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-10-02 20:45:19 -0700
committerTim Graham <timograham@gmail.com>2018-10-15 17:15:41 -0400
commit0cd465b63aa7c03a3d14bd5fd6543628d585f8da (patch)
tree99adcb585573d78d5cc01c9b9466073dbe988449 /docs/ref/unicode.txt
parent99d4fc18bdb8110147165531d348be53529eece5 (diff)
Fixed #29817 -- Deprecated settings.FILE_CHARSET.
Diffstat (limited to 'docs/ref/unicode.txt')
-rw-r--r--docs/ref/unicode.txt11
1 files changed, 5 insertions, 6 deletions
diff --git a/docs/ref/unicode.txt b/docs/ref/unicode.txt
index 0b0282b1cc..8617442318 100644
--- a/docs/ref/unicode.txt
+++ b/docs/ref/unicode.txt
@@ -265,12 +265,11 @@ Use strings when creating templates manually::
from django.template import Template
t2 = Template('This is a string template.')
-But the common case is to read templates from the filesystem, and this creates
-a slight complication: not all filesystems store their data encoded as UTF-8.
-If your template files are not stored with a UTF-8 encoding, set the :setting:`FILE_CHARSET`
-setting to the encoding of the files on disk. When Django reads in a template
-file, it will convert the data from this encoding to Unicode. (:setting:`FILE_CHARSET`
-is set to ``'utf-8'`` by default.)
+But the common case is to read templates from the filesystem. If your template
+files are not stored with a UTF-8 encoding, adjust the :setting:`TEMPLATES`
+setting. The built-in :py:mod:`~django.template.backends.django` backend
+provides the ``'file_charset'`` option to change the encoding used to read
+files from disk.
The :setting:`DEFAULT_CHARSET` setting controls the encoding of rendered templates.
This is set to UTF-8 by default.