mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-11 18:46:49 +00:00
27 lines
712 B
PHP
27 lines
712 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Reader\Xls;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Shared\CodePage;
|
|
|
|
class XlsSpecialCodePage extends \PhpOffice\PhpSpreadsheet\Reader\Xls
|
|
{
|
|
protected function readCodepage(): void
|
|
{
|
|
$length = self::getUInt2d($this->data, $this->pos + 2);
|
|
$recordData = $this->readRecordData($this->data, $this->pos + 4, $length);
|
|
|
|
// move stream pointer to next record
|
|
$this->pos += 4 + $length;
|
|
|
|
// offset: 0; size: 2; code page identifier
|
|
$codepage = self::getUInt2d($recordData, 0);
|
|
|
|
if ($this->codepage === '') {
|
|
$this->codepage = CodePage::numberToName($codepage);
|
|
}
|
|
}
|
|
}
|