0

Have troubles with encoding in Webapi answer: http://allegro.pl/webapi/

The problem is:

Sk�rzana tapicerka

Have been surfing the internet for 2 days, but even after trying these solutions, there's no result. I read the XML file of web service: http://schemas.xmlsoap.org/soap/encoding/ And on the first line there is: <?xml version='1.0' encoding='UTF-8' ?> (It's strange but this line is visible only in Maxhone (browser))

Encoding of my files - UTF-8 without BOM. Also sent a header: header('Content-Type: text/html; charset="utf-8"'); And even used META: <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />

But nothing helps. Also I tried to guess the encoding by changing it in browser, but no result too. I know, that in Poland the most used encoding is ISO-8859-2. But, I think the API's answer still UTF-8.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Is this your API? Or are you just consuming it? If the latter, you can probably be sure it is correctly using UTF-8, and that its just your consumption that is at fault. What are you using to interact with it? – halfer Feb 26 '15 at 15:15
  • In Poland (and everywhere else) the most used encoding _ought_ to be UTF-8. Use that `:-)`. – halfer Feb 26 '15 at 15:16
  • halfer, it's API Allegro.pl . I agree with idea that it uses UTF-8, and understand that problem is on my side. But can't find the solution. –  Feb 27 '15 at 08:12
  • Would you edit this question with how you are consuming the API? (It is possible the question can be reopened if you make it answerable - presently it could be any number of things). Do you have some PHP code for us to see? Can you emulate what you are doing with `curl` on the command line? – halfer Feb 27 '15 at 09:04
  • (When replying to people, use their handle e.g. @halfer - you get tab completion on this too). – halfer Feb 27 '15 at 09:05

0 Answers0