The Hub is now in read-only mode as we make improvements to the Hub experience. More information is available here.
09-12-2024 01:35 AM
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
Solved! Go to Solution.
09-13-2024 06:03 AM
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.
09-12-2024 01:37 AM
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
09-13-2024 06:03 AM
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.
Welcome to the Community - here is your guide to help you get started!