fohanlon Posted September 27, 2011 Share Posted September 27, 2011 Hi I am reading the contents of a file into a variable as follows: file_get_contents($pathtofile); If the file contains say just 3 € (euro) symbols as an example and I output the strlen I get 9 instead of 3. Could anyone tell me how I could sort of the contents (the 3 euro symbols) so I can get strlen as 3. I tried utf8_decode etc. Many Thanks Fergal. Link to comment https://forums.phpfreaks.com/topic/247987-euro-symbol-encoding/ Share on other sites More sharing options...
requinix Posted September 27, 2011 Share Posted September 27, 2011 Use mb_strlen instead. Link to comment https://forums.phpfreaks.com/topic/247987-euro-symbol-encoding/#findComment-1273362 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.