Word and UTF-8 (cyrillic, chinese, ...)
| From: | Sascha Meyer | Date: | Thu, 30 Jul 2009 11:26:11 +0000 |
| Subject: | Word and UTF-8 (cyrillic, chinese, ...) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-296052@lists.php.net to get a copy of this message | ||
Hi there,
I am currently struggling in forcing Word to show a UTF-8 encoded document. The generated document
is a normal web page with generated content from a mysql database.
When I remove the header commands, the document with proper russian characters is displayed fine in
the browser, but when I add
[CODE]
header ("Content-Type: application/vnd.ms-word;charset=utf-8");
header ("Content-Disposition:
attachment;filename=questionnaire_".date("Ymd_his").".doc");
[/CODE]
, Word opens and displays the information as chinese letters instead of russian. This also happens
for spanish and french special characters, they are also incorrectly displayed.
Any clues how I can force Word to display UTF-8 correctly?
Thanks a lot in advance!
Best regards,
Sascha
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser