Skip to content

Commit 07e8d35

Browse files
authored
fix python 2 compatible helpers for nested unicode (#58)
BUG FIXES: - Fix python 2 compatible helpers for nested CJK charset
1 parent cab6e38 commit 07e8d35

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/test_unit/test_core/test_encoder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
({"foo": True}, {"foo": "true"}),
1414
({"foo": False}, {"foo": "false"}),
1515
({"IP": ["127.0.0.1"]}, {"IP.0": "127.0.0.1"}),
16+
({"TemplateParams": [u"中文"]}, {"TemplateParams.0": u"中文"}),
1617
({"IP": ["foo", "bar"]}, {"IP.0": "foo", "IP.1": "bar"}),
1718
({"IP": [{"foo": "bar"}]}, {"IP.0.foo": "bar"}),
1819
],

ucloud/core/typesystem/encoder.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
from ucloud.core.utils.compat import str
2+
3+
14
def encode(d: dict) -> dict:
25
result = {}
36

0 commit comments

Comments
 (0)