we are using an payment extension that sends a POST response if the transaction was successful. For some reason the string contains some none UTF-8 characters.

The response looks like this OK The right resposne is OK

I have the same payment extension in other shop (different customer and server) and there the extension is working perfectly.

Does anyone have any experience what could be causing this change in the response? I talked with the developers of the extension but they say it has to be something on the server side. I checked the encoding on server and its UTF-8.

I checked the response with Chrome extension Postman and the response comes without the strange characters - "OK".

I have no idea left what could be causing this change in response string. Where could be the  generated?

Thanks for any hints.


What you are currently seeing  is the Byte Order Mark. This happens when you display a UTF-8 response without the correct encoding. Depending on how you display the response you might be able to force UTF-8 decoding in your browser by adding header('Content-Type:text/html; charset=UTF-8'); before your output or an echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';

In summary: I don't think there is an issue with the response itself just the way the content is interpreted.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.