Menu

ebcdic

Encoding (1)
rwaury

Classes and methods to convert between ASCII and EBCDIC, and ASCII and Unicode


Files

ebcdic.cpp
ebcdic.h


Classes

A2E

Stores ASCII string as EBCDIC.

Methods:

  • A2E(const char *ASCIIString)
    throws Error_Memory

  • A2E(const char *ASCIIString, size_t Length)
    throws Error_Memory

  • A2E(char *EBCDICDest, const char *ASCIIString, size_t Length)
    Behaves like a function. String is converted and copied but not stored in instance.

  • operator char* ()
    Returns EBCDIC string.

  • operator const char* ()
    Returns EBCDIC string.

E2A

Stores EBCDIC string as ASCII.

Methods:

  • E2A(const char *EBCDICString)
    throws Error_Memory

  • E2A(const char *EBCDICString, size_t Length)
    throws Error_Memory

  • E2A(char *ASCIIDest, const char *EBCDICString, size_t Length)
    Behaves like a function. String is converted and copied but not stored in instance.

  • operator char* ()
    Returns ASCII string.

  • operator const char* ()
    Returns ASCII string.

A2U

Stores ASCII string as Unicode.

Methods:

  • A2U(const char *ASCIIString)
    throws Error_Memory

  • A2U(const char *ASCIIString, size_t Length)
    throws Error_Memory

  • A2U(wchar_t *UNICODEDest, const char *ASCII, size_t Length)
    Behaves like a function. String is converted and copied but not stored in instance.

  • operator wchar_t* ()
    Returns Unicode string.

  • operator const wchar_t* ()
    Returns Unicode string.

U2A

Stores Unicode (Latin-1) string as ASCII.

Methods:

  • U2A(const wchar_t *UNICODEString)
    throws Error_Memory

  • U2A(const wchar_t *UNICODEString, size_t Length)
    throws Error_Memory

  • U2A(char *ASCIIDest, const wchar_t *UNICODE, size_t Length)
    Behaves like a function. String is converted and copied but not stored in instance.

  • operator char* ()
    Returns ASCII string.

  • operator const char* ()
    Returns ASCII string.


Functions

EBCBIC to ASCII
char e2a(char e)

converts EBCDIC character to ASCII.

estr2astr(char *Dest, const char *Src)

Converts null-terminated string. The user is responsible for the allocation of Dest.

emem2amem(void *Dest, const void *Src, size_t Length)

Copies and converts memory of length Length and from Src to Dest.

ASCII to EBCDIC
char a2e(char a)

converts ASCII character to EBCDIC.

astr2estr(char *Dest, const char *Src)

Converts null-terminated string. The user is responsible for the allocation of Dest.

amem2emem(void *Dest, const void *Src, size_t Length)

Copies and converts memory of length Length and from Src to Dest.

Unicode (Latin-1) to ASCII
char u2a(wchar_t u)

converts Unicode (Latin-1) character to ASCII.

ustr2astr(char *Dest, const wchar_t *Src)

Converts null-terminated string. The user is responsible for the allocation of Dest.

umem2amem(void *Dest, const void *Src, size_t Length)

Copies and converts memory of length Length and from Src to Dest.

ASCII to Unicode
wchar_t a2u(char a)

converts ASCII character to Unicode.

astr2ustr(wchar_t *Dest, const char *Src)

Converts null-terminated string. The user is responsible for the allocation of Dest.

amem2umem(void *Dest, const void *Src, size_t Length)

Copies and converts memory of length Length and from Src to Dest.


Usage


Related

Wiki: Home

MongoDB Logo MongoDB