I’m trying to get HTML meta tags with PHP by using get_meta_tags() function. I’m using UTF8 for tables, charset/collations, as connection charset to MySQL and everything else.
But unfortunetely MySQL cuts off the string when inserting to table. It happens while HTML encodings are different than UTF-8 (for example ISO 8859-1)
Is there any way for converting strings to UTF8 without knowing it’s encoding charset?
Encodes an ISO-8859-1 string to UTF-8 (PHP 3 >= 3.0.6, PHP 4, PHP 5)
Convert string to requested character encoding (PHP 4 >= 4.0.5, PHP 5)
However, if you want to change to UTF-8 regardless of encoding, checkout;
Convert character encoding (PHP 4 >= 4.0.6, PHP 5)