﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35944	"Postgresql: ArrayField with Unicode characters gets serialized as string of ""\u XXXX"" characters"	Oleg Sverdlov	Oleg Sverdlov	"In ArrayField.value_to_string(self, obj) the value is encoded using JSON.dumps(values), which produces escaped Unicode \u XXXX by default.

For example, an ArrayField with 3 elements [""один"", ""два"", ""три""] (1,2,3 in Russian) will produce

[""\u043e\u0434\u0438\u043d"", ""\u0434\u0432\u0430"", ""\u0442\u0440\u0438""]

While this is not a bug per se, this becomes a nuisance when viewing on result of ""dumpdata"" management command:

**The ArrayField fields will be encoded differently from other text fields.**

Perhaps there should be an option to turn on/off the ensure_ascii parameter in JSON.dumps(values, ensure_ascii=option)) ?

The option can be enabled by default, as we do for 'hstore' field, or perhaps enabled conditionally:

- in the field settings ArrayField(name='numbers', ascii_only=False)

- in settings.py ( ARRAY_FIELD_ENSURE_ASCII )

I will be glad to submit a patch.
"	Cleanup/optimization	closed	Core (Serialization)	5.1	Normal	fixed	ArrayField, postgresql, JSON	Oleg Sverdlov	Ready for checkin	1	0	0	0	0	0
