While reading hyphenated values from a csv file, I see the hyphen is gets converted into â€
My csv file contains data such as :
05‐30‐2012,user,500
06‐30‐2012,user,1500
After reading the lines I get :
05â€30â€2012,user,500
06â€30â€2012,user,1500
Why is it happening? How do I correct it ?
This is what I have done :
$lines = file('data.csv');
foreach($lines as $line_num => $line){
if($line != ''){
echo '<pre>';
print_r($line);
echo '</pre>';
}
Thanks in advance.