问题解析CSV与德国字符到PHP

**$csv_data[] =  iconv('UTF-8', 'ASCII//TRANSLIT', utf8_encode(fgets($csvfile, 1024)));**

This is what I am doing to get the input data while parsing a csv. My CSV is UTF -8 .

I tried to figure out how to print exact parsing data to php but no luck yet so far

my input is Stöckl from CSV but I get St~APckl in PHP even after the utf8 encode.

Just to let you know I am trying to get German Characters in php variable.

Any help would be greatly appreciated

Solution -

This is what fixed my problem -

header('Content-type: text/html; charset=utf-8');

and I've changed

$csv_data[] =  iconv('UTF-8', 'ASCII//TRANSLIT', utf8_encode(fgets($csvfile, 1024)));

to

$csv_data[] = fgets($csvfile, 1024);