I am getting data from a web API which has a strange encoding. I am using PHP and can't seem to decode input strings. I seem to be having this problem, which explains what's going but doesn't really help me figure out how to fix it. Can anyone help? Thanks!
Asked
Active
Viewed 609 times
0
-
Ask your API provider / see their docs to see what kind of encoding they are using. – dev-null-dweller Jan 05 '14 at 18:13
2 Answers
1
You can use mb_detect_encoding()
to detect the encoding of the strings.
If they are not what you are expecting, you can use mb_convert_encoding()
to convert to something like UTF-8 or whatever you want.

Terence Eden
- 14,034
- 3
- 48
- 89
1
You may want to try analyzing the encoding using something like mb_detect_encoding()
.

BA_Webimax
- 2,714
- 1
- 13
- 15