Some of my script are using different encoding, and when I try to combine them, this has becom an issue.
But I can’t change the encoding they use, instead I want to change the encodig of the result from script A, and use it as parameter in script B.
So: is there any simple way to change a string from UTF-8 to ISO-88591 in PHP? I have looked at utf_encode and _decode, but they doesn’t do what i want. Why doesn’t there exsist any ‘utf2iso()’-function, or similar?
I don’t think I have characters that can’t be written in ISO-format, so that shouldn’t be an huge issue.
Have a look at
iconv()ormb_convert_encoding(). Just by the way: why don’tutf8_encode()andutf8_decode()work for you?So essentially
all should do the same – with
utf8_en/decode()requiring no special extension,mb_convert_encoding()requiring ext/mbstring andiconv()requiring ext/iconv.