Bde.DBTables.AnsiToNative

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: public
Source:
Bde.DBTables.pas
Bde.DBTables.hpp
Unit: Bde.DBTables
Parent: Bde.DBTables

Delphi

function AnsiToNative(Locale: TLocale; const AnsiStr: AnsiString;
NativeStr: PAnsiChar; MaxLen: Integer): PAnsiChar; overload;

C++

extern DELPHI_PACKAGE char * __fastcall AnsiToNative(TLocale Locale, const System::AnsiString AnsiStr, char * NativeStr, int MaxLen)/* overload */;

Description

Converts a string from the ANSI character set to the character set associated with a given locale.

Call AnsiToNative to convert a string represented in the ANSI character set (used internally) to the character set associated with the database locale specified by the Locale parameter. The resulting string is copied into the buffer pointed to by the NativeStr parameter. Use the MaxLen parameter to specify the size of this buffer. If the buffer is too small to contain all characters in the converted version of AnsiStr, the returned value is truncated. AnsiToNative returns a pointer to NativeStr.

Use AnsiToNative to convert strings typed by the user into the character set used by a database table.

See Also