Morozzko.2136 Posted August 6, 2019 Share Posted August 6, 2019 Okey some guys have nickname as :"Magè" and when i parse https://api.guildwars2.com/v2/characters?access_token= i got wrong symbols, any solution? Link to comment Share on other sites More sharing options...
werdernator.6105 Posted August 6, 2019 Share Posted August 6, 2019 Api should be UTF-8 iirc Link to comment Share on other sites More sharing options...
Morozzko.2136 Posted August 7, 2019 Author Share Posted August 7, 2019 Same as ISO-8859-1 and windows-1252 shoud it works as charracter id?https://c.radikal.ru/c24/1908/5c/4f18095580c5.jpg Link to comment Share on other sites More sharing options...
Zok.4956 Posted August 27, 2019 Share Posted August 27, 2019 @Morozzko.2136 said:Same as ISO-8859-1 and windows-1252 shoud it works as charracter id?@Morozzko.2136 said:Okey some guys have nickname as :"Magè" and when i parse https://api.guildwars2.com/v2/characters?access_token= i got wrong symbols, any solution?Your API-client should treat all data from the API, this includes the character names, as UTF-8 encoded. If you use internally a different character encoding in your client you have to convert the data from UTF-8 to i.e. ISO-8859-1 etc. but then you have to convert it back to UTF-8 when you use the character name for the endpoint: "v2/characters/:id/"But be aware: There are UTF-8 characters that have no corresponding character in ISO-8859-1 and other single byte encodings. These would be lost if you convert to ISO-8859-1.So the best solution (if possible for your app) would be to use only UTF-8 character encoding in your app/client. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.