{"record":{"id":"5f38e6df9b3a2456","repo":"nodejs/node","slug":"u-unsupported-error-5f38e6","errorCode":"U_UNSUPPORTED_ERROR","errorMessage":"icupkg/ures_enumDependencies(%s res=%08x) %%ALIAS contains a '/'\\n","messagePattern":"icupkg/ures_enumDependencies\\((.+?) res=%08x\\) %%ALIAS contains a '/'\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"deps/icu-small/source/tools/toolutil/pkgitems.cpp","lineNumber":255,"sourceCode":"    // locale_ID\n\n    // search for the first slash\n    for(i=0; i<length && alias[i]!=SLASH; ++i) {}\n\n    if(res_getPublicType(res)==URES_ALIAS) {\n        // ignore aliases with an initial slash:\n        // /ICUDATA/... and /pkgname/... go to a different package\n        // /LOCALE/... are for dynamic sideways fallbacks and don't go to a fixed bundle\n        if(i==0) {\n            return; // initial slash ('/')\n        }\n\n        // ignore the intra-bundle path starting from the first slash ('/')\n        length=i;\n    } else /* URES_STRING */ {\n        // the whole string should only consist of a locale ID\n        if(i!=length) {\n            fprintf(stderr, \"icupkg/ures_enumDependencies(%s res=%08x) %%ALIAS contains a '/'\\n\",\n                            itemName, res);\n            *pErrorCode=U_UNSUPPORTED_ERROR;\n            return;\n        }\n    }\n\n    // convert the Unicode string to char *\n    char localeID[48];\n    if (length >= static_cast<int32_t>(sizeof(localeID))) {\n        fprintf(stderr, \"icupkg/ures_enumDependencies(%s res=%08x) alias locale ID length %ld too long\\n\",\n                        itemName, res, static_cast<long>(length));\n        *pErrorCode=U_BUFFER_OVERFLOW_ERROR;\n        return;\n    }\n    u_UCharsToChars(alias, localeID, length);\n    localeID[length]=0;\n\n    checkIDSuffix(itemName, localeID, -1, (useResSuffix ? \".res\" : \"\"), check, context, pErrorCode);","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/icu-small/source/tools/toolutil/pkgitems.cpp#L237-L273","documentation":"Thrown by ures_enumDependencies when an ALIAS resource of type URES_STRING (not an integer alias) contains a '/' character. ICU locale IDs must not contain slashes; a slash indicates the alias was meant to point to another package or bundle path (e.g. /ICUDATA/...) which is only valid for integer-typed aliases. For a plain string alias the entire value is expected to be a locale ID, so finding a '/' signals a corrupted or malformed resource bundle.","triggerScenarios":"Calling icupkg to enumerate dependencies on a .res bundle where an %%ALIAS entry is a URES_STRING whose value contains a '/'. The code path: ures_enumDependencies → detects URES_STRING alias → scans for '/' via u_strchr → finds one at position i!=length → sets U_UNSUPPORTED_ERROR.","commonSituations":"Building ICU data with a hand-edited or corrupted .res file; using an alias string that accidentally includes a path separator; locale ID generation bug that inserts a slash; mismatched ICU versions where alias encoding changed.","solutions":["Rebuild the offending .res bundle from canonical ICU source data rather than a patched copy.","Inspect the alias resource with genrb -d or icuinfo to identify which key has the bad alias value.","Regenerate the resource bundle with genrb from the original .txt source, ensuring alias values are pure locale IDs without '/' characters."],"exampleFix":"// before (in .txt resource source):\nMyLocale:alias(\"/ICUDATA/root\")  // string alias with slash → triggers error\n\n// after: use an integer alias or reference the correct bundle format:\nMyLocale:alias(\"root\")  // pure locale ID, no slash","handlingStrategy":"validation","validationCode":"// Before running icupkg, validate alias resources in .txt source:\n// Ensure no URES_STRING alias value contains '/' unless it's an integer alias path.\n// Regex check on alias values: ^[^/]+$ (pure locale ID, no slash)\nimport re\ndef validate_alias(alias_value: str) -> bool:\n    return '/' not in alias_value  # locale IDs must not contain '/'\n","typeGuard":null,"tryCatchPattern":"// icupkg is a CLI tool; check exit code and stderr\nimport subprocess\nresult = subprocess.run(['icupkg', '--list', 'bundle.res'], capture_output=True)\nif result.returncode != 0:\n    stderr = result.stderr.decode()\n    if 'ALIAS' in stderr and \"contains a '/'\" in stderr:\n        print(f'Malformed alias in bundle: {stderr}')","preventionTips":["Always generate .res files from .txt sources with genrb rather than editing binary data.","Validate locale IDs in alias values before building (no '/' characters).","Use the same ICU version for genrb and icupkg to avoid encoding differences."],"tags":["icu","resource-bundle","alias","locale-id","malformed-data"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}