support russian characters

Topics: Developer Forum, User Forum
Oct 14, 2012 at 1:30 PM

write

require_once('PHPExcel.php');
$phpexcel = new PHPExcel();
$page = $phpexcel->setActiveSheetIndex(0);
$page->setCellValue("B2", "Hello world"); // this
$page->setTitle("Test");
$objWriter = PHPExcel_IOFactory::createWriter($phpexcel, 'Excel2007');
$objWriter->save("test.xlsx");

everything is working !

require_once('PHPExcel.php');
$phpexcel = new PHPExcel();
$page = $phpexcel->setActiveSheetIndex(0);
$page->setCellValue("B2", "Привет мир"); // russian version - Hello world
$page->setTitle("Test");
$objWriter = PHPExcel_IOFactory::createWriter($phpexcel, 'Excel2007');
$objWriter->save("test.xlsx");

waiting: "Привет мир" (without the quotes)

reality: ""  (without the quotes)

 

what did I make not correctly?

Coordinator
Oct 14, 2012 at 3:02 PM

Is your script saved as UTF-8? PHPExcel is written to work with UTF-8 internally, so as long as your  "Привет мир" was UTF-8 then there should be no problem at all

Oct 15, 2012 at 1:42 PM

yes. Thank you!