Data.DB.TDataSet.Translate

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Translate(Src, Dest: PAnsiChar; ToOem: Boolean): Integer; virtual;

C++

virtual int __fastcall Translate(char * Src, char * Dest, bool ToOem);

Properties

Type Visibility Source Unit Parent
function public
Data.DB.pas
Data.DB.hpp
Data.DB TDataSet

Description

Attention: Translate is deprecated.

Implements a virtual procedure to copy a data string from a source to a destination, optionally performing character translation during the copy.

As implemented by TDataSet, Translate copies a source string to a destination string, and ignores the value passed in ToOem. Translate provides a fallback method for derived dataset objects that do not reimplement Translate.

Custom datasets can use Translate to convert strings between ANSI UTF-8 (the native character mapping for dataset components) and any character mapping used by the underlying data access mechanism. When ToOem is true, Translate converts from ANSI to the underlying data access mapping. When ToOem is false, Translate reverses that conversion.