0

I'm doing a curl request and I'm getting this reply:-

Expected : "£12709"

Got : "£12709"

I have no clue what "Â" this character is.

7
  • Do you get that when sending a request outside of PHP? I'm assuming youre not using utf-8. Try curl_setopt($ch, CURLOPT_ENCODING ,""); Commented Apr 27, 2015 at 23:29
  • Hi, im not sending request outside php. Just tried your solution and still no luck :( Commented Apr 27, 2015 at 23:31
  • 1
    This is probably UTF-8 data wrongly being interpreted as ISO-8859-1. You could use utf8_decode to decode it properly. Commented Apr 27, 2015 at 23:32
  • Two other SO questions on this here: stackoverflow.com/questions/10761411/php-curl-utf-8-charset and here: stackoverflow.com/questions/649480/… Commented Apr 27, 2015 at 23:33
  • Maybe check the encoding and convert it like here stackoverflow.com/questions/649480/… Commented Apr 27, 2015 at 23:35

1 Answer 1

0

I found these two similar SO posts that may be helpful:

PHP Curl UTF-8 Charset

CURL import character encoding problem

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.