|
Q3270
A Qt-based 3270 Terminal Emulator
|
#include <CodePage.h>
Public Member Functions | |
| CodePage () | |
| CodePage::CodePage - Code page representation. | |
| QString | getUnicodeChar (uchar ebcdic) const |
| CodePage::getUnicodeChar - return the Unicode character from the EBCDIC character. | |
| QString | getUnicodeGraphicChar (uchar ebcdic) const |
| CodePage::getUnicodeGraphicChar - return the Unicode equivalent of the EBCIDC character. | |
| uchar | getEBCDIC (uchar acscii) const |
| CodePage::getEBCDIC. | |
| void | setCodePage (QString codepage) |
| CodePage::setCodePage - set the current codepage. | |
| const QString | getCodePage () const |
| const QStringList | getCodePageList () const |
| CodePage::getCodePageList - return a QStringList of the available codepages. | |
The CodePage class.
This class is used to convert from EBCDIC to a Unicode character, or from an entered keyboard character to EBCDIC.
It's probably not the best way to do it, but it works.
| CodePage::CodePage | ( | ) |
CodePage::CodePage - Code page representation.
CodePage contains the various codepages used by 3270 displays. Built in code pages are currently 037 (US), 285 (UK) and 310 (Graphics).
Each code page is represented by 256 Unicode characters which represent the EBCDIC code points from 0x00 to 0xFF in Unicode form, and a corresponding 256 bytes held as EBCDIC characters, representing the ASCII (Latin 1) characters for those positions in EBCDIC.
The default code page at 'power on' is 037.
| const QStringList CodePage::getCodePageList | ( | ) | const |
CodePage::getCodePageList - return a QStringList of the available codepages.
getCodePageList is used in the Preferences dialog to provide a drop-down list of codepages that the user can choose from.
Codepages can be hidden from the user's view by setting the 'selectable' flag in the structure to false.
| uchar CodePage::getEBCDIC | ( | uchar | ascii | ) | const |
| ascii | - the ASCII character for which the EBCDIC equivalent is to be returned |
Return the EBCDIC character for the ASCII one passed.
| QString CodePage::getUnicodeChar | ( | uchar | ebcdic | ) | const |
CodePage::getUnicodeChar - return the Unicode character from the EBCDIC character.
| ebcdic | - the character in EBCDIC |
getUnicodeChar returns the Unicode equivalent of the EBCDIC character passed.
| QString CodePage::getUnicodeGraphicChar | ( | uchar | ebcdic | ) | const |
CodePage::getUnicodeGraphicChar - return the Unicode equivalent of the EBCIDC character.
| ebcdic | - the Graphic Escape EBCDIC character |
getUnicodeGraphicChar returns the Unicode character for the EBCIDC "Graphic Escape" character passed. This is simply the standard EBCDIC character, but from the 310 codepage.
| void CodePage::setCodePage | ( | QString | codepage | ) |
CodePage::setCodePage - set the current codepage.
| codepage | - the codepage by name to be set. |
setCodePage is used when the user chooses a different code page, either when loading a new session setting or manually changing it in the Preferences dialog.