I have a PHP code which writes a JSON file when it's called. The file contains a few latin characters from spanish and portuguese language. It is displayed correctly on the browser when browsing it directly to it's URL, but in the application and in the developer console under the response preview tab, these characters are replaced by the character �.
Picture to better explain the situation: (Click picture to open in full size)
The file is written in PHP with the following code:
file_put_contents('../data/cameras.json', $json, LOCK_EX);
I tried many ways to fix this encoding with no success (some of them even removed the characters, but that's not an acceptable solution).
Any suggestions of how to solve this problem?