From RAD Studio API Documentation
Jump to: navigation, search


procedure AnsiToNativeBuf(Locale: TLocale; Source, Dest: PAnsiChar; Len: Integer);


extern DELPHI_PACKAGE void __fastcall AnsiToNativeBuf(void * Locale, char * Source, char * Dest, int Len);


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

Call AnsiToNativeBuf to convert a null-terminated string in the ANSI character set (used internally by Windows) 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 Dest parameter. Use the Len parameter to specify the size of this buffer.

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

See Also