Bug #67664 [Opn->Fbk]: String conversion functions wrong for multibyte chars

From: Date: Sat, 08 Feb 2020 11:19:27 +0000
Subject: Bug #67664 [Opn->Fbk]: String conversion functions wrong for multibyte chars
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225447@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67664&edit=1 ID: 67664 Updated by: cmb@php.net Reported by: tuugii83 at gmail dot com Summary: String conversion functions wrong for multibyte chars -Status: Open +Status: Feedback Type: Bug Package: COM related Operating System: Windows 7 PHP Version: 5.5.14 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: 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> Previous Comments: ------------------------------------------------------------------------ [2014-07-22 03:48:03] 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: -------------- ХҮДЭРБАТ ফ ୩ ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67664&edit=1

« previous php.bugs (#225447) next »