{"record":{"id":"cad318b8740252f1","repo":"oracle/graal","slug":"unsupported-unicode-s-s","errorCode":null,"errorMessage":"Unsupported Unicode %s '%s'","messagePattern":"Unsupported Unicode (.+?) '(.+?)'","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"regex/src/com.oracle.truffle.regex/src/com/oracle/truffle/regex/charset/UnicodeProperties.java","lineNumber":229,"sourceCode":"    }\n\n    public boolean isSupportedGeneralCategory(String generalCategoryName) {\n        return data.lookupGeneralCategoryAlias(generalCategoryName, nameMatchingMode) != null;\n    }\n\n    public boolean isSupportedScript(String scriptName) {\n        return data.lookupScriptAlias(scriptName, nameMatchingMode) != null;\n    }\n\n    public boolean isSupportedBlock(String blockName) {\n        assert withBlocks();\n        return data.lookupBlockAlias(blockName, nameMatchingMode) != null;\n    }\n\n    private static String returnOrThrow(String propertyName, String errorName, String name) {\n        if (name == null) {\n            CompilerDirectives.transferToInterpreterAndInvalidate();\n            throw new IllegalArgumentException(String.format(\"Unsupported Unicode %s '%s'\", errorName, propertyName));\n        }\n        return name;\n    }\n\n}\n","sourceCodeStart":211,"sourceCodeEnd":235,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/regex/src/com.oracle.truffle.regex/src/com/oracle/truffle/regex/charset/UnicodeProperties.java#L211-L235","documentation":"returnOrThrow is the shared helper for alias lookup of property, general category, script, and block names. When the database's lookup returns null (name is not a recognized alias under the current matching mode), it throws IllegalArgumentException \"Unsupported Unicode %s '%s'\" naming the kind (character property / general category / script name / block name) and the input.","triggerScenarios":"An unknown or misspelled name in \\p{...} or \\p{...=...}: \\p{General_Category=Leter}, \\p{sc=Unknown_Script_Name}, \\p{gc=Ltt} where the alias is not in the database, or names that only match under loose matching when strict matching is active.","commonSituations":"Typos and case errors in property names; using long descriptive names where only short aliases exist (or vice versa); Unicode version drift where an alias was added later; copy-pasting ICU/Perl property names unsupported here.","solutions":["Check the exact alias tables for the engine's Unicode version; prefer canonical short names (gc=Lu, sc=Latn, blk=Basic_Latin).","Fix typos and separators in the property spec.","Upgrade GraalVM/TRegex if the alias exists in a newer Unicode version.","Substitute an explicit character range when no supported name exists."],"exampleFix":"// before\ncompile(\"\\\\p{script=greek}\"); // 'greek' not an alias under current matching mode\n\n// after\ncompile(\"\\\\p{sc=Grek}\"); // canonical script alias","handlingStrategy":"validation","validationCode":"// validate names against the engine's lookup before compiling\nboolean ok = props.isSupportedProperty(name) \n        || props.isSupportedGeneralCategory(name) \n        || props.isSupportedScript(name) \n        || props.isSupportedBlock(name);","typeGuard":null,"tryCatchPattern":"try {\n    return engine.compile(pattern);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Unsupported Unicode\")) {\n        throw new IllegalArgumentException(\"Bad property name in pattern: \" + pattern, e);\n    }\n    throw e;\n}","preventionTips":["Prefer canonical short aliases (gc=Lu, sc=Grek, blk=Basic_Latin) in generated patterns.","Spell-check property names when porting patterns between engines.","Validate property escapes against the engine's supported set in a pattern-lint pass."],"tags":["regex","truffle","unicode","alias","property-escape"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}