I create csv file with fputcsv. I want csv file to be in windows1251 ecnding. But can’t find the solution. How can I do that?
Cheers
I create csv file with fputcsv. I want csv file to be in windows1251
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Default encoding for an excel file is machine specific ANSI, mainly
windows1252. But since you are creating that file and maybe inserting UTF-8 characters, that file is not going to be handled ok.You could use
iconv()when creating the file. Eg: