asANSI

asANSI(lcid: Integer): Binary;

The asANSI method of the String primitive type returns the receiving string converted to a Binary value using the character set of the code page for the locale specified by the lcid parameter. You can use this method in a Unicode environment to produce ANSI strings in a binary format.

An exception is raised on the first source character that cannot be represented in the code page of the specified locale; for example, a multi-byte Chinese character encountered when the locale is specified as New Zealand.