From: vtsupermok at gmail dot com Operating system: window PHP version: 5.1.2 PHP Bug Type: COM related Bug description: microsoft word bug
Description: ------------ Actually this bug is same with the bug #31327. http://bugs.php.net/bug.php?id=31327 Although the bug has been assigned to someone but sadly it haven't been solved for a long time. The developer beleieve it is caused by the setting of com.code_page and stop solve the bug. But I'm sure it isn't since I have try all the code page that micosoft word support. So I'm really hope someone can solve this problem. This problem has been exist from 4.x until now, in microsoft word only (Excel is normal) and english is normal but Chinese has problem Reproduce code: --------------- <?php $code_page=array('950','0','1','2','3','65001'); for ($i=0;$i<count($code_page);$i++){ // starting word $word = new COM("word.application",NULL,$code_page[$i]) or die("Unable to instantiate Word"); echo "Loaded Word, version {$word->Version}\n"; //bring it to front $word->Visible = 1; //open an empty document $word->Documents->Add(); //do some weird stuff $word->Selection->TypeText("ÄãºÃá"); $path="D:\\AppServ\\www\\word\\".$i.".doc"; echo $path."<br>"; $word->Documents[1]->SaveAs($path); //closing word $word->Quit(); //free the object $word = null; } ?> Expected result: ---------------- ÄãºÃá Actual result: -------------- ÄãºÃá___ (there are 3 spaces or square after my words, but I use underline to represent it) -- Edit bug report at http://bugs.php.net/?id=36695&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36695&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36695&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36695&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36695&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36695&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36695&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36695&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36695&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36695&r=support Expected behavior: http://bugs.php.net/fix.php?id=36695&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36695&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36695&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36695&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36695&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36695&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36695&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36695&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36695&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36695&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36695&r=mysqlcfg
