SysTryReturn(NID_BASE_UTIL, pValue != null, null, E_INVALID_ARG, "[%s] Invalid argument is used. The pValue is null.", GetErrorMessage(E_INVALID_ARG));
int len = wcslen(pValue);
+ if (len == 0)
+ {
+ char* pRet = new (std::nothrow) char[1];
+ SysTryReturn(NID_BASE_UTIL, pRet != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ pRet[0] = '\0';
+ SetLastResult(E_SUCCESS);
+ return pRet;
+ }
UErrorCode err = U_ZERO_ERROR;
UConverter* pConverter = ucnv_open("UTF-8", &err);