Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fix parsing of feeds that include unicode characters #59

Closed
wants to merge 1 commit into from

3 participants

@smarx

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 azure.storage import TableService
ts = TableService('<ACCOUNT>', '<KEY>')
ts.create_table('test')
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
@smortaz

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

@andrerod
Collaborator

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

So I'm going to close this PR.

Thanks once again and keep them coming,
Andre

@andrerod andrerod closed this
@smarx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 23, 2012
  1. @smarx
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/azure/__init__.py
View
2  src/azure/__init__.py
@@ -276,7 +276,7 @@ def _convert_response_to_feeds(response, convert_func):
xml_entries = _get_children_from_path(xmldoc, 'entry') #in some cases, response contains only entry but no feed
for xml_entry in xml_entries:
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')))
return feeds
Something went wrong with that request. Please try again.