Internationalization and localization tools


File and Path Function

int _sopen(const char *filename, int oflag, int shflag [, int pmode ]);

int _wsopen(const wchar_t *filename, int oflag, int shflag [, int pmode ]);

int _tsopen(const TCHAR *filename, int oflag, int shflag [, int pmode ]);

Internationalization (I18n) Function Overview

The _sopen function opens the file specified by filename at the OS level for shared access. oflag indicates the type of operations allowed, shflag indicates the type of sharing allowed, and pmode specifies the permission setting. The function returns a file descriptor for the opened file if successful; else it returns -1 and sets the global errno variable with the error.

_wsopen is the wide-character version of _sopen; its argument is a wide-character string.

_tsopen is the Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _sopen or _wsopen.

See the MSDN Library for additional information on the function, including the possible settings of the flag and permission arguments.

I18n Issues

Use the appropriate version of the function as required for internationalization support.

See Pathnames for a discussion of path and filename considerations in an internationalized application, and File I/O, which addresses reading and writing non-ASCII text data files.

Recommended Replacements*

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

File and Path Functions

 

Lingoport internationalization and localization services and software