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

Function CPLRecodeFromWChar

port/cpl_recode.cpp:163–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161 */
162
163char CPL_DLL *CPLRecodeFromWChar(const wchar_t *pwszSource,
164 const char *pszSrcEncoding,
165 const char *pszDstEncoding)
166
167{
168#ifdef CPL_RECODE_ICONV
169 /* -------------------------------------------------------------------- */
170 /* Conversions from CPL_ENC_UCS2 */
171 /* to CPL_ENC_UTF8, CPL_ENC_ISO8859_1 and CPL_ENC_ASCII are well */
172 /* handled by the stub implementation. */
173 /* -------------------------------------------------------------------- */
174 if ((EQUAL(pszSrcEncoding, CPL_ENC_UCS2) ||
175 EQUAL(pszSrcEncoding, "WCHAR_T")) &&
176 (EQUAL(pszDstEncoding, CPL_ENC_UTF8) ||
177 EQUAL(pszDstEncoding, CPL_ENC_ASCII) ||
178 EQUAL(pszDstEncoding, CPL_ENC_ISO8859_1)))
179 {
180 return CPLRecodeFromWCharStub(pwszSource, pszSrcEncoding,
181 pszDstEncoding);
182 }
183
184 return CPLRecodeFromWCharIconv(pwszSource, pszSrcEncoding, pszDstEncoding);
185
186#else // CPL_RECODE_STUB
187 return CPLRecodeFromWCharStub(pwszSource, pszSrcEncoding, pszDstEncoding);
188#endif // CPL_RECODE_ICONV
189}
190
191/************************************************************************/
192/* CPLRecodeToWChar() */

Callers 15

ogr_xerces.cppFile · 0.85
ACTextUnescapeFunction · 0.85
ToUTF8Method · 0.85
RecodeByDSSIMethod · 0.85
WStringToStringFunction · 0.85
ReadUTF16StringFunction · 0.85
WStringToStringFunction · 0.85
GetMinMaxValueMethod · 0.85
TEST_FFunction · 0.85
commonutils.hFile · 0.85
FetchMethod · 0.85

Calls 3

CPLRecodeFromWCharStubFunction · 0.85
CPLRecodeFromWCharIconvFunction · 0.85
EQUALFunction · 0.50

Tested by 1

TEST_FFunction · 0.68