Edit report at https://bugs.php.net/bug.php?id=37899&edit=1
ID: 37899 Comment by: potyomkine at gmail dot com Reported by: okumurya at gmail dot com Summary: [PATCH] php_char_to _OLECHAR copies junk bytes Status: Assigned Type: Bug Package: COM related Operating System: Windows 2000 Professional PHP Version: 5.2.3 Assigned To: wharmby Block user comment: N Private report: N New Comment: I also have the same problem with PHP 5.2.17. Previous Comments: ------------------------------------------------------------------------ [2008-10-21 20:20:35] vincent at eal dot com I also have the same problem with PHP 5.2.3. ------------------------------------------------------------------------ [2007-08-24 12:16:11] j...@php.net Assigned to the maintainer. ------------------------------------------------------------------------ [2007-08-12 07:14:23] okumurya at gmail dot com I tested on PHP-5.2.3, and the problem still occured. ------------------------------------------------------------------------ [2007-08-12 07:04:37] okumurya at gmail dot com I tested following code on PHP-4.4.7, the problem still occured. <?php /* * via: http://ml.php.gr.jp/pipermail/php-users/2007-April/032463.html */ ini_set('mbstring.language', 'Japanese'); ini_set('mbstring.internal_encoding', 'UTF-8'); class setWord { var $Word; var $doc; function setWord(){ $this->Word = new COM('Word.Application'); $this->Word->Visible = false; $this->Word->DisplayAlerts = 0; } function documentOpen(){ $this->doc = $this->Word->Documents->Add(); $this->doc->Activate; } function setParam($param){ $this->Word->Selection->TypeText($param); } function SaveAs(){ $this->Word->Documents[1]->SaveAs("C:/TMP/hoge.doc"); } function unsetObj(){ $this->Word->Documents[1]->Close(); $this->Word->Quit(); $this->Word = null; } function returnWord($param){ $this->documentOpen(); $this->setParam($param); $this->SaveAs(); $this->unsetObj(); } } $cls = new setWord(); $cls->returnWord("\x82\xA0\x82\xA2\x82\xA4\x82\xA6\x82\xA8"); // Japanese Hiragana A I U E O ?> ------------------------------------------------------------------------ [2007-07-11 12:49:49] j...@php.net And does this problem exist in PHP 5.2.3? (see also previous comment by Stas) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=37899 -- Edit this bug report at https://bugs.php.net/bug.php?id=37899&edit=1