Documentation
Back to website >

ConvertOemToAnsi (Pascalscript)

Description

ConvertOemToAnsi converts the specified string OEM string into an ANSI string.

Syntax

function ConvertOemToAnsi(const S: string): string;

Arguments

ConvertOemToAnsi converts the OEM string S into an ANSI string. OEM strings are the codepage 437 or 850 character set encoding used by DOS, the umlauts are converted as follows:

AnsiOEM ASCII
Ä142
ä132
Ö153
ö148
Ü154
ü129
ß225

The conversion from ANSI to OEM is useful if data from DOS applications is to be imported from the report generator.

Example

var
  S1: String;
  S2: String;
begin
  S1:='DOS-Zrger';
  S2:=ConvertOemToAnsi(S1);
  ShowMessage(S2);
end;

Rules to understand the script can be found here.

The text 'DOS-Zrger' is assigned to the string variable S1. The function ConvertOemToAnsi converts the text into Ansi characters and assigns the result to the string variable S2. The Ansi text is only suitable for import purposes of DOS applications.

ShowMessage shows: DOS-Ärger