OemToChr$ function  


Translates a byte string of OEM characters into ANSI/WIDE characters.


a$ = OemToChr$(OemExpr$)

a$$ = OemToChr$(GRAPHIC, OemExpr$)


OemExpr$ contains a series of byte (8-bit) characters in OEM format.  OemToChr$ translates it into either ANSI multi-byte equivalent characters or WIDE (16-bit) Unicode characters, depending upon the context of the source code.  PowerBASIC will always choose the correct form with no intervention needed by the programmer.  Control codes, CHR$(0) to CHR$(31) and CHR$(127), are handled uniquely, as they are normally considered to be non-printing characters.  By default, they are just copied, without any translation.


If the option GRAPHIC is included, it indicates you want to convert control codes into the codes which will display the graphic symbols defined in the original IBM OEM character set.  Most of these codes are only available as wide Unicode characters.

See also

ChrToOem$, ChrToUtf8$, Utf8ToChr$