Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MsDoc(*.doc) cyrillic symbols #1927

Closed
ScriptedEngineer opened this issue Sep 3, 2020 · 2 comments · Fixed by #2664
Closed

MsDoc(*.doc) cyrillic symbols #1927

ScriptedEngineer opened this issue Sep 3, 2020 · 2 comments · Fixed by #2664
Assignees
Labels
Bug Report MS-DOC (Word 97) Status: Waiting for feedback Question has been asked, waiting for response from PR author
Milestone

Comments

@ScriptedEngineer
Copy link

ScriptedEngineer commented Sep 3, 2020

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
@Progi1984
Copy link
Member

@ScriptedEngineer Hi, Could you send me a file with this case, please, for analysis ?

@Progi1984 Progi1984 added MS-DOC (Word 97) Status: Waiting for feedback Question has been asked, waiting for response from PR author labels Aug 22, 2024
@Progi1984 Progi1984 added this to the 1.3.0 milestone Aug 30, 2024
@Progi1984 Progi1984 self-assigned this Aug 30, 2024
@Progi1984
Copy link
Member

@ScriptedEngineer

This issue has been fixed by a maintainer in the PR #2664. You can help him by sponsoring him through Github sponsors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report MS-DOC (Word 97) Status: Waiting for feedback Question has been asked, waiting for response from PR author
Development

Successfully merging a pull request may close this issue.

2 participants