r.osmanov Posted May 29, 2010 Share Posted May 29, 2010 Hi there! You should have considered it strange, but I really need this kind of conversion. Content is fetched throught Smarty templates, and everything works fine with UTF-8. But I have to deal with CP1251(Windows-1251) also, in order to make an XML export to one of Russian services. I just set names cp1251; before fetching from DB and saving the template code. However, I've a serialize()'d field in DB that couldn't be unserialized in Smarty modifier function like function smarty_modifier_unserialize($string){ if ($string) return unserialize($string); return false; } since it should deal just with UTF-8. Is there a walkaround? Maybe I should write kinda special bynary unserialize function? Regards. Link to comment https://forums.phpfreaks.com/topic/203257-how-to-unserialize-utf-8-serialized-cp1251-representation-of-string/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.