Quote:
Hi, I used the following codes to split the "Text (Tab delimited) (*.txt)" format I saved as using my Excel
$email = fgetcsv($fp,999, "\t");
cell1 cell2
王 test@email.com
it works
$email[0] contains 王
and
$email[0] contains test@email.com
but it will result in "??" displayed in the text document instead of 王
so I tried to use Save As Unicode Text (*.txt)
it displays the unicode character as it is
but, the
$email = fgetcsv($fp,999, "\t"); can't seem to split it up anymore, even though it shows 王 test@email.com in the text file
anyone can explain why or how to rectify?
thanks!
|
hmm... I just confirmed that PHP doesnt seem to be able to read any text document which is encoded as UNICODE (choose SAVE AS from text editor)
The thing is, I need to read out the unicode characters in the unicoded text document
@ $fp = fopen("email.txt",'r');
$email = fgetcsv($fp,999, "\t");
This doesnt seem to work if the email.txt is in unicoded
how to make it readable ?