I have the following situation, I work with software A vehicle sales, it has the opportunity to sell and it has a media (as the customer was aware of the opportunity), in addition to store opportunities, software A receives information from a vehicle site, this sends us the media information with different encoding of software A media, then it is saved in the bank with strange characters, Display would look something like: Indicates $ Á & ; .
The site sends something like:
header("Content-Type: text/html; charset=utf-8");
...
$cliente = new client("http://999.999.999.999/WebService", false, $host, $porta, $usuario, $senha);
$chave_json = '[{ "chaveIntegracao" : "var1_",
"valor" : "'.$_POST["var1"].'"},
{"chaveIntegracao" : "var2_",
"valor" : "'.$_POST["var2"].'"},
{"chaveIntegracao" : "var3_",
"valor" : "'.$_POST["var3"].'"},
{"chaveIntegracao" : "var4_",
"valor" : "'.$_POST["var4"].'"
}]';
$dados[interfaceJson] = $chave_json;
$result = $cliente->call('criarEvento', $dados, 'http://.../', 'http://.../');
Is there any way to get the strange code and convert, without having to deal with every possibility of a strange character?
//transforma qualquer encoding em UTF-8
CastEncoding(vo.getMidia(),"UTF-8");