#37899 [Opn]: [PATCH] php_char_to _OLECHAR copies junk bytes
| From: | okumurya at gmail dot com | Date: | Sun, 12 Aug 2007 07:14:24 +0000 |
| Subject: | #37899 [Opn]: [PATCH] php_char_to _OLECHAR copies junk bytes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-115986@lists.php.net to get a copy of this message | ||
ID: 37899
User updated by: okumurya at gmail dot com
Reported By: okumurya at gmail dot com
Status: Open
Bug Type: COM related
Operating System: Windows 2000 Professional
-PHP Version: 4.4.2, 4.4.7
+PHP Version: 4.4.2, 4.4.7, 5.2.3
Assigned To: wez
New Comment:
I tested on PHP-5.2.3, and the problem still occured.
Previous Comments:
------------------------------------------------------------------------
[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-19 01:00:00] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2007-07-11 12:49:49] jani@php.net
And does this problem exist in PHP 5.2.3? (see also previous comment by
Stas)
------------------------------------------------------------------------
[2007-04-02 20:29:11] stas@php.net
Could you provide some example reproducing the problem? Preferably with
some COM available on standard Windows/Office machine or easily
installable.
------------------------------------------------------------------------
[2007-03-05 22:43:52] okumurya at hotmail dot com
Hello fjortiz
> did your last patch work for you?
Yes my patch works.
------------------------------------------------------------------------
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
http://bugs.php.net/37899
--
Edit this bug report at http://bugs.php.net/?id=37899&edit=1