changeset db29f8a10314 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset&node=db29f8a10314
description:
        Dumps Dict values in UTF-8 instead of ASCII

        This is how they are stored in the database and so we must use also the 
UTF-8
        version when using unaccent to properly remove the accents.

        issue11418
diffstat:

 trytond/model/fields/dict.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r b0d60f23ed96 -r db29f8a10314 trytond/model/fields/dict.py
--- a/trytond/model/fields/dict.py      Sat Apr 16 18:30:20 2022 +0200
+++ b/trytond/model/fields/dict.py      Mon Apr 18 19:40:01 2022 +0200
@@ -16,7 +16,8 @@
 
 # Use canonical form
 dumps = partial(
-    json.dumps, cls=JSONEncoder, separators=(',', ':'), sort_keys=True)
+    json.dumps, cls=JSONEncoder, separators=(',', ':'), sort_keys=True,
+    ensure_ascii=False)
 
 
 class Dict(Field):

Reply via email to