Internationalization and localization tools


Character Manipulation Function

char* fgets(char* string, int n, FILE *stream);

wchar_t* fgetws(wchar_t* string, int n, FILE *stream);

TCHAR* _fgetts(TCHAR* string, int n, FILE *stream);.

Internationalization (I18n) Function Overview

The fgets function reads a maximum of n characters from the input stream stream, and stores the resulting string in string. It returns null in the event of an error, or else a pointer to string.

fgetws is the wide-character version of fgets; its argument and return are wide-character string buffers.

_fgetts is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either fgets or fgetws.

I18n Issues

Use the appropriate version of the function as required for internationalization support, ensuring that the count argument n is correct for the chosen platform. See Locale-Sensitive Length Functions for a discussion on single-byte, multibyte, and wide character sizes.

See Character I/O for a discussion on non-ASCII character input/output in an internationalized application.

Recommended Replacements*

*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.

Character Manipulation Functions

 

Lingoport internationalization and localization services and software