Skip to content

MsDoc(*.doc) cyrillic symbols #1927

Closed
@ScriptedEngineer

Description

@ScriptedEngineer

Describe the Bug

*.doc (MsDoc) cyrillic symbols reading is not working correctly
image

Steps to Reproduce

1.Create MsDoc(*.doc) file with cyrillic symbols
2.Run this code

<?
require __DIR__ . '/vendor/autoload.php';
$phpDoc = \PhpOffice\PhpWord\IOFactory::load("FileName.doc", 'MsDoc');
$body = "";
foreach ($phpDoc->getSections() as $sections) {
  foreach ($sections->getElements() as $el) {
    if($el instanceof PhpOffice\PhpWord\Element\Text){//
      $body .= $el->getText();
    }
  }
}
echo($body);

Expected Behavior

Normal text

Current Behavior

image

Context

  • PHP Version: 5.6
  • PHPWord Version: 0.17.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions