Skip to content
This repository

fix parsing of feeds that include unicode characters #59

wants to merge 1 commit into from

3 participants

Steve Marx smortaz André Rodrigues
Steve Marx

Note that I haven't tested this extensively... I've pretty much only tried it with the simple case below:

# -*- coding: utf-8 -*-
import azure
from import TableService
ts = TableService('<ACCOUNT>', '<KEY>')
try: ts.insert_entity('test', {'PartitionKey': 'test', 'RowKey': 'test', 'Description': 'ꀕ'})
except azure.WindowsAzureConflictError: pass
print ts.get_entity('test', 'test', 'test').Description
for e in ts.query_entities('test', "PartitionKey eq 'test'"):
    print e.Description # blows up with encoding error

Thanks Steve for the fix! Much appreciated & folded in.

André Rodrigues

Steve, thanks for your fix. It seems this had already been applied in:

So I'm going to close this PR.

Thanks once again and keep them coming,

André Rodrigues andrerod closed this October 17, 2012
Steve Marx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Aug 23, 2012
Steve Marx fix parsing of feeds that include unicode characters 52826e0
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  src/azure/
2  src/azure/
@@ -276,7 +276,7 @@ def _convert_response_to_feeds(response, convert_func):
276 276
         xml_entries = _get_children_from_path(xmldoc, 'entry') #in some cases, response contains only entry but no feed
277 277
     for xml_entry in xml_entries:
278 278
         new_node = _clone_node_with_namespaces(xml_entry, xmldoc)
-        feeds.append(convert_func(new_node.toxml()))
+        feeds.append(convert_func(new_node.toxml('utf-8')))
280 280
281 281
     return feeds
282 282

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.