B
B
Bartholomew Izoldin2014-03-19 15:24:54
PHP
Bartholomew Izoldin, 2014-03-19 15:24:54

Why is PHP outputting text from a csv file in a different encoding?

Question: Why does alert print the output message "p»їРњR°Sp»їРњР° true text;text;text"?
What we have:
php file (utf8 encoding)
csv file (utf8 encoding)
js file (utf8 encoding)
csv content looks like:
"Text Text true text;text;text"
PHP text:
$my_file = file("jobs.csv") ;
for($i=0;$i

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Varfalomey Izoldin, 2014-03-19
@izoldin

Question removed. I set utf8 in the site settings on nic.ru.
Thanks to all who answered.

V
v_prom, 2014-03-19
@v_prom

try iconv() to re-encode, somewhere apparently all the same another encoding.

V
Varfalomey Izoldin, 2014-03-19
@izoldin

Just tried on another hosting everything is fine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question