Skip to content

Commit 3bc40ad

Browse files
Merge pull request #1 from EmersonElectricCo/flattenCell-fix
flattenCell Fix
2 parents f9f8e18 + 5249e11 commit 3bc40ad

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Scripts/script-CommonServerPython.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,16 @@ script: |-
491491
if isinstance(data, STRING_TYPES):
492492
return data
493493
elif isinstance(data, list):
494-
return ',\n'.join(str(d) for d in data)
494+
string_list = []
495+
for d in data:
496+
try:
497+
string_list.append(str(d))
498+
except UnicodeEncodeError:
499+
string_list.append(d.encode('utf-8'))
500+
501+
return ',\n'.join(string_list)
495502
else:
496-
return json.dumps(data, indent=indent)
503+
return json.dumps(data, indent=indent, ensure_ascii=False)
497504
498505
499506
def FormatIso8601(t):

0 commit comments

Comments
 (0)