Internationalization and localization tools


String Format Function

int _cscanf(const char *format [, argument] ... );

int _cwscanf(const wchar_t *format [, argument] ...);

int _tcscanf(const TCHAR *format [, argument] ...);

Internationalization (I18n) Function Overview

The _cscanf function reads data directly from the console into the locations given by argument, returning the number of fields that were successfully formatted and assigned. Each optional parameter must be a pointer to a variable with a type that corresponds to a type specifier in format.

_cwscanf is the wide-character version of _cscanf; its format argument is a wide-character string.

_tcscanf is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _cscanf or _cwscanf.

I18n Issues

Use the appropriate version of the function as required for Windows platform support, noting the following:

These functions should not be used for strings that are locale-dependent, as neither _cscanf or _cwscanf are dependent on the user's locale.

See String Formatting in C and C++ for a discussion on locale-sensitive formatting in internationalized applications.

Recommended Platform Replacements

String Format Functions

 

Lingoport internationalization and localization services and software