Bug #67664 [NEW]: String conversion functions wrong for multibyte chars
| From: | tuugii83 at gmail dot com | Date: | Tue, 22 Jul 2014 03:48:05 +0000 |
| Subject: | Bug #67664 [NEW]: String conversion functions wrong for multibyte chars | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-186768@lists.php.net to get a copy of this message | ||
From: tuugii83 at gmail dot com
Operating system: Windows 7
PHP version: 5.5.14
Package: COM related
Bug Type: Bug
Bug description:String conversion functions wrong for multibyte chars
Description:
------------
Mongolian string creating the COM string with junk bytes at the end.
xammp v3.2.1
PHP Version 5.5.11
Test script:
---------------
MySourceCode :
..........
$word = new COM("word.application", NULL, CP_UTF8) or die("Unable to
start Word");
$template_file = "template.doc";
$word->visible=1;
$word->Documents->Open($template_file);
$BkMark = $word->ActiveDocument->Bookmarks("NAME");
$range = $BkMark->Range;
$range->Text = "Ð¥Ò®ÐÐÐ ÐÐТ";
$word->Documents[1]->SaveAs($template_file);
$word = null;
..........
Expected result:
----------------
Ð¥Ò®ÐÐÐ ÐÐТ
Actual result:
--------------
Ð¥Ò®ÐÐÐ ÐÐТ ফ îà©
--
Edit bug report at https://bugs.php.net/bug.php?id=67664&edit=1
--