Hi,
I am relatively new to PHP. I need to combine information from various sites, which I retrieve using CURL. However, some sites return text coded in UTF-8 while others return ISO-8859-1. The result is that all special (accented) characters from the latter sites get mangled when I combine the results in UTF-8.
Is there a way in PHP to convert ISO-8859-1 text to UTF-8?
Thanks, Peter
How do I combine UTF-8 and ISO-8859-1 results from CURL ?
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: How do I combine UTF-8 and ISO-8859-1 results from CURL ?
Take a look at the mb_*() (MB String) functions, iconv(), utf8_decode() and others
Your safest bet is probably to try and turn everything into UTF-8.
-
devendra-m
- Forum Contributor
- Posts: 111
- Joined: Wed Sep 12, 2007 3:16 am
Re: How do I combine UTF-8 and ISO-8859-1 results from CURL ?
Thanks! utf8_encode() did the trickdevendra-m wrote:utf8_encode