nodejs/node · info

0

0

Error message

U_INVALID_FORMAT_ERROR occurred but UCONFIG_NO_LEGACY_CONVERSION is on so this is expected.\n

What it means

Informational message printed when ICU is built with UCONFIG_NO_LEGACY_CONVERSION enabled and an input file fails the ICU data format check (error 888). Instead of exiting with an error, the tool exits with code 0, treating this as expected behavior. This is not an error condition — it indicates legacy conversion support was intentionally compiled out.

Source

Thrown at deps/icu-small/source/tools/toolutil/package.cpp:360

        exit(U_FILE_ACCESS_ERROR);
    }

    /* pad the file to a multiple of 16 using the usual padding byte */
    if(fileLength<length) {
        memset(data.getAlias()+fileLength, 0xaa, length-fileLength);
    }

    fclose(file);

    // minimum check for ICU-format data
    errorCode=U_ZERO_ERROR;
    typeEnum=getTypeEnumForInputData(data.getAlias(), length, &errorCode);
    if(typeEnum<0 || U_FAILURE(errorCode)) {
        fprintf(stderr, "icupkg: not an ICU data file: \"%s\"\n", filename);
#if !UCONFIG_NO_LEGACY_CONVERSION
        exit(U_INVALID_FORMAT_ERROR);
#else
        fprintf(stderr, "U_INVALID_FORMAT_ERROR occurred but UCONFIG_NO_LEGACY_CONVERSION is on so this is expected.\n");
        exit(0);
#endif
    }
    type=makeTypeLetter(typeEnum);

    return data.orphan();
}

// .dat package file representation ---------------------------------------- ***

U_CDECL_BEGIN

static int32_t U_CALLCONV
compareItems(const void * /*context*/, const void *left, const void *right) {
    U_NAMESPACE_USE

    return (int32_t)strcmp(((Item *)left)->name, ((Item *)right)->name);
}

View on GitHub (pinned to 1b2de5e052)

Solutions

  1. This is expected behavior if UCONFIG_NO_LEGACY_CONVERSION is intentionally enabled — no action needed.
  2. If legacy conversion is needed, rebuild ICU without UCONFIG_NO_LEGACY_CONVERSION.
  3. Verify the data file uses a supported (non-legacy) charset if you still need it processed.
Defensive patterns

Strategy: validation

Prevention

When it happens

Trigger: getTypeEnumForInputData() fails on a data file, but UCONFIG_NO_LEGACY_CONVERSION is defined at compile time. The preprocessor #else branch fires, prints this informational message, and exits(0) instead of exit(U_INVALID_FORMAT_ERROR).

Common situations: Running icupkg on a system or embedded build where legacy charset conversion is disabled to reduce ICU binary size; cross-compilation environments with minimal ICU configurations; stripped-down ICU builds for mobile or IoT platforms.

Related errors


AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13). Data as JSON: /api/errors/4c39c206e03f35d6. Report an issue: GitHub.