cancel
Showing results for 
Search instead for 
Did you mean: 

Activity report

linxi
Mt. Kenya

When uploading activity data to strava, if the activity name and description are not in English, what encoding format should I use to transmit them so that they can be correctly displayed in the strava app

1 ACCEPTED SOLUTION

All text fields in Strava use UTF-8. If you look at the headers for any API response you should see:

Content-Type: application/json; charset=utf-8

My suggestion would be to use the app/website to manually update the activity using the characters which are not being displayed properly. Make sure they show up correctly so you can confirm that Strava handles them as expected.

Assuming they are displayed correctly, use the API to retrieve the activity data (https://developers.strava.com/docs/reference/#api-Activities-getActivityById) and look at how the data is encoded in the returned response.

Finally, try using the API to update the activity using the same encoding and see if the characters are displayed as expected. You could even just get the activity data and issue an update using the exact same data that was returned to confirm it is handled correctly.

View solution in original post

2 REPLIES 2

linxi
Mt. Kenya

I tried to encode the Chinese through US_ASCII, base64,utf-8, etc., but the unmatched Chinese characters could not be displayed in strava app

All text fields in Strava use UTF-8. If you look at the headers for any API response you should see:

Content-Type: application/json; charset=utf-8

My suggestion would be to use the app/website to manually update the activity using the characters which are not being displayed properly. Make sure they show up correctly so you can confirm that Strava handles them as expected.

Assuming they are displayed correctly, use the API to retrieve the activity data (https://developers.strava.com/docs/reference/#api-Activities-getActivityById) and look at how the data is encoded in the returned response.

Finally, try using the API to update the activity using the same encoding and see if the characters are displayed as expected. You could even just get the activity data and issue an update using the exact same data that was returned to confirm it is handled correctly.

Ready, Get Set, Go!

Welcome to the Community - here is your guide to help you get started!


Know how to use Community


Understand Community Settings