Ract-native проблема с кодировкой в fetch()
Получаю данные из БД MySQL, но если в БД запись на русском языке, то в ответ мне возвращаются знаки вопросов. В чем может быть проблема?
webCall=()=>{
return fetch('/getorder_api.php',
{
method: 'POST',
headers:
{
'Accept': 'application/json',
'Content-Type': 'application/json; charset=utf-8',
},
body: JSON.stringify(
{
email: this.props.navigation.state.params.email
})})
.then((response) => response.json())
.then((responseJson) => {
if (responseJson == "not found"){
this.setState({
isLoading: false,
data: []
})
}
else{
this.setState({
isLoading: false,
dataSource: responseJson
}, function() {
// In this block you can do something with new state.
//this.arrayholder = responseJson;
});
}})
.catch((error) => {
console.error(error);
});
}