|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67664 String conversion functions wrong for multibyte chars
Submitted: 2014-07-22 03:48 UTC Modified: 2020-02-16 04:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: tuugii83 at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: COM related
PHP Version: 5.5.14 OS: Windows 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tuugii83 at gmail dot com
New email:
PHP Version: OS:


 [2014-07-22 03:48 UTC] tuugii83 at gmail dot com
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";

$BkMark = $word->ActiveDocument->Bookmarks("NAME");
$range = $BkMark->Range;
$range->Text = "ХҮДЭРБАТ";
$word = null;

Expected result:

Actual result:
ХҮДЭРБАТ ফ  ୩  


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-02-08 11:19 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-02-08 11:19 UTC]
Using the following variant of the supplied test script, I get the
expected results.

$word = new COM("word.application", NULL, CP_UTF8);
$doc = $word->Documents->Add();
$range = $doc->Range();
$range->Text = 'ХҮДЭРБАТ';

Can you still reproduce the reported bug with any of the actively
supported PHP versions[1]?

[1] <>
 [2020-02-16 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 13:01:27 2024 UTC