Q3270
A Qt-based 3270 Terminal Emulator
Loading...
Searching...
No Matches
CodePage Class Reference

The CodePage class. More...

#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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CodePage()

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.

Member Function Documentation

◆ getCodePageList()

const QStringList CodePage::getCodePageList ( ) const

CodePage::getCodePageList - return a QStringList of the available codepages.

Returns
A list of the available code pages

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.

◆ getEBCDIC()

uchar CodePage::getEBCDIC ( uchar  ascii) const

CodePage::getEBCDIC.

Parameters
ascii- the ASCII character for which the EBCDIC equivalent is to be returned
Returns
The EBCDIC character for the passed ASCII equivalent

Return the EBCDIC character for the ASCII one passed.

◆ getUnicodeChar()

QString CodePage::getUnicodeChar ( uchar  ebcdic) const

CodePage::getUnicodeChar - return the Unicode character from the EBCDIC character.

Parameters
ebcdic- the character in EBCDIC
Returns
The Unicode equivalent of the EBCDIC character

getUnicodeChar returns the Unicode equivalent of the EBCDIC character passed.

◆ getUnicodeGraphicChar()

QString CodePage::getUnicodeGraphicChar ( uchar  ebcdic) const

CodePage::getUnicodeGraphicChar - return the Unicode equivalent of the EBCIDC character.

Parameters
ebcdic- the Graphic Escape EBCDIC character
Returns
The Unicode equivalent of the 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.

◆ setCodePage()

void CodePage::setCodePage ( QString  codepage)

CodePage::setCodePage - set the current codepage.

Parameters
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.


The documentation for this class was generated from the following files: