php.net |  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
Votes:2
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tuugii83 at gmail dot com
New email:
PHP Version: OS:

 

 [2014-07-22 03:48 UTC] tuugii83 at gmail dot com
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:
--------------
ХҮДЭРБАТ ফ  ୩  

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

<?php
$word = new COM("word.application", NULL, CP_UTF8);
$word->visible=1;
$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] <https://www.php.net/supported-versions.php>
 [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: Tue Apr 23 06:01:30 2024 UTC