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

PhpOffice\PhpSpreadsheet\Helper\Html() used for set html to cell, but russian charactor change to some special charactor #444

Closed
alagesanbe08 opened this issue Mar 29, 2018 · 1 comment
Labels

Comments

@alagesanbe08
Copy link

This is:

PhpOffice\PhpSpreadsheet\Helper\Html() used for set html to cell, but russian charactor change to some special character

What is the expected behavior?

Смеситель для раковины Jacob Delafon Aleo E72277-CP

What is the current behavior?

Сме�и�ел� дл� �аковин� Jacob Delafon Aleo E72277-CP

What are the steps to reproduce?

 require __DIR__ . '/vendor/autoload.php';

// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();

$wizard = new \PhpOffice\PhpSpreadsheet\Helper\Html();
 $value = "Смеситель для раковины Jacob Delafon Aleo E72277-CP";
$cellValue = $wizard->toRichTextObject($value);
         print_r($cellValue);                   
@MarkBaker
Copy link
Member

You need to pass UTF-8 to the helper, same as setting cell values from strings should always be UTF-8. Is this a UTF-8 value?

@PowerKiKi PowerKiKi added the bug label May 20, 2018
Dfred pushed a commit to Dfred/PhpSpreadsheet that referenced this issue Nov 20, 2018
Assume UTF-8 encoding. Not assuming UTF-8 would mangle text such as "русский"

Fixes PHPOffice#444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants