MCPcopy Create free account
hub / github.com/OSGeo/gdal / CPLRecodeToWChar

Function CPLRecodeToWChar

port/cpl_recode.cpp:219–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217 */
218
219wchar_t CPL_DLL *CPLRecodeToWChar(const char *pszSource,
220 const char *pszSrcEncoding,
221 const char *pszDstEncoding)
222
223{
224#ifdef CPL_RECODE_ICONV
225 /* -------------------------------------------------------------------- */
226 /* Conversions to CPL_ENC_UCS2 */
227 /* from CPL_ENC_UTF8, CPL_ENC_ISO8859_1 and CPL_ENC_ASCII are well */
228 /* handled by the stub implementation. */
229 /* -------------------------------------------------------------------- */
230 if ((EQUAL(pszDstEncoding, CPL_ENC_UCS2) ||
231 EQUAL(pszDstEncoding, "WCHAR_T")) &&
232 (EQUAL(pszSrcEncoding, CPL_ENC_UTF8) ||
233 EQUAL(pszSrcEncoding, CPL_ENC_ASCII) ||
234 EQUAL(pszSrcEncoding, CPL_ENC_ISO8859_1)))
235 {
236 return CPLRecodeToWCharStub(pszSource, pszSrcEncoding, pszDstEncoding);
237 }
238
239 return CPLRecodeToWCharIconv(pszSource, pszSrcEncoding, pszDstEncoding);
240
241#else // CPL_RECODE_STUB
242 return CPLRecodeToWCharStub(pszSource, pszSrcEncoding, pszDstEncoding);
243#endif // CPL_RECODE_ICONV
244}
245
246/************************************************************************/
247/* CPLIsASCII() */

Callers 15

TextEscapeMethod · 0.85
FromUTF8Method · 0.85
StringToWStringFunction · 0.85
CreateFeatureBCPMethod · 0.85
AppendFieldValueMethod · 0.85
WriteUTF16StringFunction · 0.85
StringToWStringFunction · 0.85
CreateAttributeIndexMethod · 0.85
SetConstraintMethod · 0.85
RunMethod · 0.85
LoadPythonAPIFunction · 0.85

Calls 3

CPLRecodeToWCharStubFunction · 0.85
CPLRecodeToWCharIconvFunction · 0.85
EQUALFunction · 0.50

Tested by

no test coverage detected