3 ms·
Just yesterday I ran into this exact problem. In PHP curl_exec returns data in the raw encoding of the source. Fine, some people will want that. But I want to
by ptarjan 17y ago
Just yesterday I ran into this exact problem.
In PHP curl_exec returns data in the raw encoding of the source. Fine, some people will want that. But I want to do things with the data, so I want it in UTF8.
So, I ended up writing my own curl_exec_utf8 function which I'm sure is wrong for many edge cases, but it is 2010! Why is there no decent ways to deal with charsets?
Here is the function, in case any of you need it, or want to point out how it is hopelessly broken : http://stackoverflow.com/questions/2510868/php-convert-web-page-to-utf8/2513938#2513938 http://stackoverflow.com/questions/2510868/php-convert-web-p...
- thmz 17y agoIf we are lucky they will fix it before 2011. http://www.php.net/~scoates/unicode/render_func_data.php?x=0 http://www.php.net/~scoates/unicode/render_func_data.php?x=0 Complete 70.70