| 995 | static bool bLogInit = false; |
| 996 | |
| 997 | static FILE *CPLfopenUTF8(const char *pszFilename, const char *pszAccess) |
| 998 | { |
| 999 | FILE *f; |
| 1000 | #ifdef _WIN32 |
| 1001 | wchar_t *pwszFilename = |
| 1002 | CPLRecodeToWChar(pszFilename, CPL_ENC_UTF8, CPL_ENC_UCS2); |
| 1003 | wchar_t *pwszAccess = |
| 1004 | CPLRecodeToWChar(pszAccess, CPL_ENC_UTF8, CPL_ENC_UCS2); |
| 1005 | f = _wfopen(pwszFilename, pwszAccess); |
| 1006 | VSIFree(pwszFilename); |
| 1007 | VSIFree(pwszAccess); |
| 1008 | #else |
| 1009 | f = fopen(pszFilename, pszAccess); |
| 1010 | #endif |
| 1011 | return f; |
| 1012 | } |
| 1013 | |
| 1014 | /** Default error handler. */ |
| 1015 | void CPL_STDCALL CPLDefaultErrorHandler(CPLErr eErrClass, CPLErrorNum nError, |
no test coverage detected