Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_STABLE UFILE* U_EXPORT2 u_fopen ( const char *  filename,
const char *  perm,
const char *  locale,
const char *  codepage 

Open a UFILE. A UFILE is a wrapper around a FILE* that is locale and codepage aware. That is, data written to a UFILE will be formatted using the conventions specified by that UFILE's Locale; this data will be in the character set specified by that UFILE's codepage.

filename The name of the file to open.
perm The read/write permission for the UFILE; one of "r", "w", "rw"
locale The locale whose conventions will be used to format and parse output. If this parameter is NULL, the default locale will be used.
codepage The codepage in which data will be written to and read from the file. If this paramter is NULL the system default codepage will be used.
A new UFILE, or NULL if an error occurred. ICU 3.0

Definition at line 131 of file ufile.c.

References TRUE.

    UFILE     *result;
    FILE     *systemFile = fopen(filename, perm);
    if(systemFile == 0) {
        return 0;

    result = finit_owner(systemFile, locale, codepage, TRUE);

    if (!result) {
        /* Something bad happened.
           Maybe the converter couldn't be opened. */

    return result;

Generated by  Doxygen 1.6.0   Back to index