Classes and methods to convert between ASCII and EBCDIC, and ASCII and Unicode
ebcdic.cpp
ebcdic.h
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.
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.
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.
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.
converts EBCDIC character to ASCII.
Converts null-terminated string. The user is responsible for the allocation of Dest.
Copies and converts memory of length Length and from Src to Dest.
converts ASCII character to EBCDIC.
Converts null-terminated string. The user is responsible for the allocation of Dest.
Copies and converts memory of length Length and from Src to Dest.
converts Unicode (Latin-1) character to ASCII.
Converts null-terminated string. The user is responsible for the allocation of Dest.
Copies and converts memory of length Length and from Src to Dest.
converts ASCII character to Unicode.
Converts null-terminated string. The user is responsible for the allocation of Dest.
Copies and converts memory of length Length and from Src to Dest.