/usr/include/scilab/charEncoding.h is in scilab-include 6.0.1-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | /*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) INRIA - Allan CORNET
* Copyright (C) 2009 - DIGITEO - Antoine ELIAS , Allan CORNET
* Copyright (C) 2012 - 2016 - Scilab Enterprises
*
* This file is hereby licensed under the terms of the GNU GPL v2.0,
* pursuant to article 5.3.4 of the CeCILL v.2.1.
* This file was originally licensed under the terms of the CeCILL v2.1,
* and continues to be available under such terms.
* For more information, see the COPYING file which you should have received
* along with this program.
*
*/
#ifndef __CHARENCODING_H__
#define __CHARENCODING_H__
#include <wchar.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "BOOL.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* wcfopen macro for fopen Multibyte char multiplatform
* @param[out] fp file descriptor
* @param[in] x filename
* @param[in] y mode
*/
#ifdef _MSC_VER
#define wcfopen(fp, x,y) \
{\
wchar_t* wfilename = NULL;\
wchar_t* wmode = NULL;\
wfilename = to_wide_string(x);\
wmode = to_wide_string(y);\
if(wfilename == NULL || wmode == NULL){fp = 0;}\
else {fp = _wfopen(wfilename, wmode);}\
if(wfilename != NULL){FREE(wfilename);}\
if(wmode != NULL){FREE(wmode);} \
}
#else
#define wcfopen(fp, x,y) \
{\
fp = fopen(x, y);\
}
#endif
/**
* convert a UTF string to wide char string
* @param[in] UTF string
* @return wide char string converted
*/
wchar_t* to_wide_string(const char *_UTFStr);
/**
* convert a wide char string to UTF-8
* @param[in] wide char string
* @return UTF string converted
*/
char *wide_string_to_UTF8(const wchar_t *_wide);
/*file management with UTF filename*/
#ifdef _MSC_VER
int wcstat(char* filename, struct _stat *st);
#endif
/**
* checks input text is a valid UTF-8 format
* @param[in] string to check
* @return TRUE or FALSE
*/
BOOL IsValidUTF8(const char* pStText);
#ifdef __cplusplus
}
#endif
#endif /* __CHARENCODING_H__ */
|