Typepad API categories are encoded in latin-1 for french accents?

15 views
Skip to first unread message

Samir A.

unread,
Nov 15, 2011, 12:08:58 PM11/15/11
to TypePad Developers Network
Hello,

I try to get typepad posts via the API.
I use typepad python client for that.

Code sample :

posts_endpoint_url = 'https://api.typepad.com/blogs/%s/post-assets/
@recent.json' % blog.url_id
data = json.dumps({ "start-index" : 1, "max-results" : 20})
headers = {'content-type':'application/json'}
response, content = typepad.client.request(posts_endpoint_url,
method='GET', body=data, headers=headers)

All featched content is UTF-8 except the categories that are encoded
in Latin-1

A simple content.decode('latin-1').encode('utf-8') show me the exact
accent "é".

Regards,

Samir A.


Reply all
Reply to author
Forward
0 new messages