summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorHasan Ramezani <hasan.r67@gmail.com>2020-04-23 22:14:32 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-04-28 11:11:39 +0200
commit68fc21b3784aa34c7ba5515ab02ef0c7b6ee856d (patch)
tree39d65227052483e21221a3605fad9050e299077e /docs
parent8970bb4cfdc56cb90b84ff2154afe622c9e9eaf7 (diff)
Fixed #29249 -- Made JSON and YAML serializers use Unicode by default.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/3.1.txt5
-rw-r--r--docs/topics/serialization.txt10
2 files changed, 15 insertions, 0 deletions
diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt
index fbefef589f..16cb9c4e6e 100644
--- a/docs/releases/3.1.txt
+++ b/docs/releases/3.1.txt
@@ -668,6 +668,11 @@ Miscellaneous
* The undocumented ``version`` parameter to the
:class:`~django.contrib.gis.db.models.functions.AsKML` function is removed.
+* :ref:`JSON and YAML serializers <serialization-formats>`, used by
+ :djadmin:`dumpdata`, now dump all data with Unicode by default. If you need
+ the previous behavior, pass ``ensure_ascii=True`` to JSON serializer, or
+ ``allow_unicode=False`` to YAML serializer.
+
.. _deprecated-features-3.1:
Features deprecated in 3.1
diff --git a/docs/topics/serialization.txt b/docs/topics/serialization.txt
index 93af47ef28..00322ac64b 100644
--- a/docs/topics/serialization.txt
+++ b/docs/topics/serialization.txt
@@ -274,6 +274,11 @@ function::
Also note that GeoDjango provides a :doc:`customized GeoJSON serializer
</ref/contrib/gis/serializers>`.
+.. versionchanged:: 3.1
+
+ All data is now dumped with Unicode. If you need the previous behavior,
+ pass ``ensure_ascii=True`` to the ``serializers.serialize()`` function.
+
``DjangoJSONEncoder``
~~~~~~~~~~~~~~~~~~~~~
@@ -315,6 +320,11 @@ again a mapping with the key being name of the field and the value the value::
Referential fields are again represented by the PK or sequence of PKs.
+.. versionchanged:: 3.1
+
+ All data is now dumped with Unicode. If you need the previous behavior,
+ pass ``allow_unicode=False`` to the ``serializers.serialize()`` function.
+
.. _topics-serialization-natural-keys:
Natural keys