mirror of
https://github.com/openharmony/js_api_module.git
synced 2026-07-25 06:25:37 -04:00
@@ -45,7 +45,8 @@ namespace OHOS::Util {
|
||||
(i32Flag & static_cast<uint32_t>(ConverterFlags::FATAL_FLG)) ==
|
||||
static_cast<uint32_t>(ConverterFlags::FATAL_FLG);
|
||||
UErrorCode codeflag = U_ZERO_ERROR;
|
||||
UConverter *conv = ucnv_open(encStr_.c_str(), &codeflag);
|
||||
char *pStr = const_cast<char*>(encStr_.c_str());
|
||||
UConverter *conv = ucnv_open(pStr, &codeflag);
|
||||
if (U_FAILURE(codeflag)) {
|
||||
HILOG_ERROR("ucnv_open failed !");
|
||||
return;
|
||||
@@ -174,7 +175,7 @@ namespace OHOS::Util {
|
||||
void TextDecoder::SetBomFlag(const UChar *arr, const UErrorCode codeFlag, const DecodeArr decArr,
|
||||
size_t &rstLen, bool &bomFlag)
|
||||
{
|
||||
if (arr == nullptr) {
|
||||
if (arr == nullptr ) {
|
||||
return;
|
||||
}
|
||||
if (U_SUCCESS(codeFlag)) {
|
||||
|
||||
Reference in New Issue
Block a user