I'm having a lot of problems with properly processing certain special characters in my application.
Here's what I'm doing at the moment:
- User enters a location, data is retrieved via the Google Geolocation API (full name, lat and lon) and is sent via ajax (as a JSON string) to a python script
- The python script parses the JSON string, reads the parameters and executes a http request to an API, which runs on nodejs
- Data is inserted into MongoDB
The problem is when there's a special character in the location name. The original location name I'm testing on has the character è. When the json is parsed in Python I get a \xc9 and after the process completes I always end up with a completely different (mostly invalid) character in the database than what was originally entered. I've tried all sorts of encoding and decoding (mostly from similar questions on stackoverflow), but I don't properly understand what exactly I should do.
Any tips would be appreciated. Thanks!