Public Member Functions | |
| __construct ($id, array $codePageData) | |
| getData () | |
| getIconv () | |
| getId () | |
| getName () | |
| getNotes () | |
| isEncodable () | |
Public Attributes | |
| const | INPUT_ENCODING = "UTF-8" |
Static Protected Member Functions | |
| static | generateEncodingMap ($iconvName) |
Protected Attributes | |
| $data | |
| $iconv | |
| $id | |
| $name | |
| $notes | |
Class to handle data about a particular CodePage, as loaded from the receipt print database.
Also computes map between UTF-8 and this encoding if necessary, using the iconv library.
| Mike42\Escpos\CodePage::__construct | ( | $id, | |
| array | $codePageData | ||
| ) |
|
staticprotected |
Given an iconv encoding name, generate a 128-character UTF-8 string, containing code points 128-255.
This string is used to map UTF-8 characters to their location in this code page.
| string | $iconvName | Name of the encoding |
| Mike42\Escpos\CodePage::getData | ( | ) |
Get a 128-character data string representing this encoding. It will be calculated and cached if it was not previously known.
| InvalidArgumentException | Where the data is now known or computable. |
| Mike42\Escpos\CodePage::getIconv | ( | ) |
| Mike42\Escpos\CodePage::getId | ( | ) |
| Mike42\Escpos\CodePage::getName | ( | ) |
Name of the code page.
| Mike42\Escpos\CodePage::getNotes | ( | ) |
The notes may explain quirks about a code-page, such as a source if it's non-standard or un-encodeable.
| Mike42\Escpos\CodePage::isEncodable | ( | ) |
Many printers contain vendor-specific code pages, which are named but have not been identified or typed out. For our purposes, this is an "un-encodeable" code page.
|
protected |
Data string, null if not known (can be computed with iconv)
|
protected |
Iconv encoding name, null if not known
|
protected |
Internal ID of the CodePage
|
protected |
Name of the code page. Substituted with the ID if not set.
|
protected |
Notes on this code page, or null if not set.
| const Mike42\Escpos\CodePage::INPUT_ENCODING = "UTF-8" |
The input encoding for generating character maps with iconv.
1.8.8