Skip to content

Commit e6621f0

Browse files
unknownunknown
unknown
authored and
unknown
committed
Fixed the encoding issue.
1 parent 32691fc commit e6621f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/azure/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ def _convert_response_to_feeds(response, convert_func):
276276
xml_entries = _get_children_from_path(xmldoc, 'entry') #in some cases, response contains only entry but no feed
277277
for xml_entry in xml_entries:
278278
new_node = _clone_node_with_namespaces(xml_entry, xmldoc)
279-
feeds.append(convert_func(new_node.toxml()))
279+
feeds.append(convert_func(new_node.toxml('utf-8')))
280280

281281
return feeds
282282

@@ -286,7 +286,7 @@ def _validate_not_none(param_name, param):
286286

287287
def _fill_list_of(xmldoc, element_type):
288288
xmlelements = _get_child_nodes(xmldoc, element_type.__name__)
289-
return [_parse_response_body(xmlelement.toxml(), element_type) for xmlelement in xmlelements]
289+
return [_parse_response_body(xmlelement.toxml('utf-8'), element_type) for xmlelement in xmlelements]
290290

291291
def _fill_dict(xmldoc, element_name):
292292
xmlelements = _get_child_nodes(xmldoc, element_name)
@@ -312,7 +312,7 @@ def _fill_instance_child(xmldoc, element_name, return_type):
312312

313313
def _fill_instance_element(element, return_type):
314314
"""Converts a DOM element into the specified object"""
315-
return _parse_response_body(element.toxml(), return_type)
315+
return _parse_response_body(element.toxml('utf-8'), return_type)
316316

317317

318318
def _fill_data_minidom(xmldoc, element_name, data_member):

0 commit comments

Comments
 (0)