I have JSON API server its working fine.
What my server does is, It takes the requests from clients in text format, example "Movie Name". And look for the requested string (Movie Name) on the other server, the other server will reply back the details of the Movie, such as released date, Language and rating etc... and my server will return back the details to client, all is working fine.
i keep the requested_logs(MovieNames) means if the query succeeded with result from other server then it will log it in a file with Movie Name, also i keep the logs of not_found_logs means if the other server reply NULL my server will keep the logs as NOT_FOUND and the Movie Name.
i check the logs every now and then and i found some strange characters in both files Requested_logs and Not_Found_Logs
My clients requested to my server this strings
1. Aniołki Charliego
2. Książę Persji: Piaski czasu
3. Złap mnie, jeśli potrafisz
4. Bogowie i potwory
These are very strange characters for me to understand but what shock me that, this Movie Names get logged in my Requested_log file means the other server also understand the request and reply the result !
what i did i copy the text and tried the google translate and it got translated to these. It shows Detected Languages -> Polish
1. Aniołki Charliego => Charlie's Angels
2. Książę Persji: Piaski czasu => Prince of Persia: The sands of time
3. Złap mnie, jeśli potrafisz => Catch me if you can
4. Bogowie i potwory => Gods and monsters
I don't understand how polish language can have characters like "Książę" and how the other server and the google-translate can understand this characters ?
Can somebody explain this behavior and also if possible please suggest me to save the exact same translated text to my logs file instead the RAW strings for PHP
Thanks