ascii2Ansi Function

Converts a string from the OEM code page 437 to the ANSI code page.

NoteNote

This function is obsolete. See the Remarks section for more information.



str ascii2Ansi(str asciistring)

Parameter

Description

asciistring

The string to convert.

The ANSI code page string equivalent to the asciistring parameter.

The ansi2Ascii and ascii2Ansi functions remain available for backward compatibility and to provide support for code points of less than 128. Instead of this function, use the TextIo class. This class automatically translates Unicode to code page 437, or conversely, during read and write operations.

The old calling pattern was:

AsciiIo io;
FileIoPermission perm;
;
perm = new FileIoPermission("filename", "w");
if (perm == null)
{
    return;
}
perm.assert();

// BP deviation documented.
io = new AsciiIo("filename", "w");
if (io != null)
{
    io.write(ascii2ansi("string"));
}

The new calling pattern is:

TextIO io;
;
io = new TextIO("filename", "w", 437);
…
io.write("string");

Community Additions

ADD
Show: