RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DBTables.AnsiToNative Function

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

Pascal
function AnsiToNative(Locale: TLocale; const AnsiStr: AnsiString; NativeStr: PAnsiChar; MaxLen: Integer): PAnsiChar; overload;
C++
PAnsiChar AnsiToNative(TLocale Locale, const AnsiString AnsiStr, PAnsiChar NativeStr, int MaxLen);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!