Specify .doc file encoding when creating with php?

Posted by arma on Stack Overflow See other posts from Stack Overflow or by arma
Published on 2011-01-13T13:51:18Z Indexed on 2011/01/13 13:53 UTC
Read the original article Hit count: 198

Filed under:

Hey,

Currently i try to create some of my database export work more automated and i decided to go with exporting data from MySql database to .doc file in php.

So im doing some database work and store complete html to a $str variable and then write/make new file:

$fp = fopen($file, 'w+'); fwrite($fp,$str); fclose($fp);

The problem here is not creating .doc file, but when i download and view that .doc file it's not in UTF-8 it's in unicode.

© Stack Overflow or respective owner

Related posts about php