my name is Juraj Čarnogurský. Notice the Č
character.
I want to send my name from the one server to API. But my last name gets replaced with this
"firstName":"Juraj","lastName":"
arnogurský"}}
which ruins the JSON format.
I am using NodeJS btw.
How to encode my last name to the form suitable for network transfer?
EDIT
I do this:
const jsonrpc = require('jsonrpc-lite');
const requestHttp = require('request');
and this:
let obj = jsonrpc.request(id, method, params);
requestHttp({
uri: 'http://localhost:3001/api?data=' + JSON.stringify(obj),
method: 'GET',
}, (error, response, body) => { ...
and as id I send '1'
as method I send addCustomer
and as params I send this:
{
customerId: senderID,
facebookId: senderID,
firstName: context.user.firstName,
lastName: context.user.lastName,
}
where context.user.lastName
is Čarnogurský