-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Poco::Json::Object::stringify represents UTF-8 encoed string as unicode escaped characters when JSON object contains an array.
Expected behavior
"{"hints":["Пример", "Пример", "Пример", "Пример"],"id":7}"
Actual behavior
"{"hints":["\u041F\u0440\u0438\u043C\u0435\u0440","\u041F\u0440\u0438\u043C\u0435\u0440","\u041F\u0440\u0438\u043C\u0435\u0440","\u041F\u0440\u0438\u043C\u0435\u0440"],"id":7}"
Steps to reproduce the problem
Construct a JSON object containing an array with cyrilic UTF-8 encoded string
POCO version
1.9.0
Compiler and version
Visual studio 2017
Operating system and version
Windows 7 x64 Pro
Other relevant information
When object doesn't contain an array, no unicode characters escaped. But when an array present in object unicode escape take place.
Is this OK?
Object.h line 297:
inline void Object::setEscapeUnicode(bool escape)
{
_escapeUnicode = true; //Always true???
}
Array.h line 217:
inline void Array::setEscapeUnicode(bool escape)
{
_escapeUnicode = true; //Always true???
}