Humanizr/Humanizer · error · FileNotFoundException
Missing Unicode 16 input '{input.Key}'.
Error message
Missing Unicode 16 input '{input.Key}'. What it means
Thrown by the UnicodeDataGenerator tool when one of the five required Unicode Character Database (UCD) input files is not found in the specified input directory. The generator needs UnicodeData.txt, CaseFolding.txt, Scripts.txt, ScriptExtensions.txt, and DerivedNormalizationProps.txt to produce inflection data.
Source
Thrown at tools/Humanizer.UnicodeDataGenerator/Program.cs:35
}
var repositoryRoot = FindRepositoryRoot(Directory.GetCurrentDirectory());
var inputDirectory = Path.GetFullPath(args[0]);
var inputs = new Dictionary<string, string>(StringComparer.Ordinal)
{
["UnicodeData.txt"] = "ff58e5823bd095166564a006e47d111130813dcf8bf234ef79fa51a870edb48f", // DevSkim: ignore DS173237
["CaseFolding.txt"] = "6f1f9c588eb4a5c718d9e8f93b782685e5c7fec872cf05e8e6878053599e09bb", // DevSkim: ignore DS173237
["Scripts.txt"] = "9e88f0a677df47311106340be8ede2ecdacd9c1c931831218d2be6d5508e0039", // DevSkim: ignore DS173237
["ScriptExtensions.txt"] = "049117ce26b9769fe2749b06eef51a50a89faef4a97764dd2d81daa715980700", // DevSkim: ignore DS173237
["DerivedNormalizationProps.txt"] = "4d4c03892dea9146d674b686e495df2d55a28d071ac474041d73518f887abddc" // DevSkim: ignore DS173237
};
foreach (var input in inputs)
{
var path = Path.Combine(inputDirectory, input.Key);
if (!File.Exists(path))
{
throw new FileNotFoundException($"Missing Unicode 16 input '{input.Key}'.", path);
}
var actual = Convert.ToHexString(SHA256.HashData(File.ReadAllBytes(path))).ToLowerInvariant();
if (actual != input.Value)
{
throw new InvalidOperationException(
$"Unicode 16 input '{input.Key}' has SHA-256 {actual}; expected {input.Value}.");
}
}
var unicodeDataPath = Path.Combine(inputDirectory, "UnicodeData.txt");
var categories = new string?[scalarCount];
var uppercaseMappings = new Dictionary<int, int>();
var lowercaseMappings = new Dictionary<int, int>();
ReadUnicodeData(
unicodeDataPath,
categories,
uppercaseMappings,View on GitHub (pinned to ffc2b77c0f)
Solutions
- Download all five required UCD files from unicode.org into the input directory.
- Verify the directory path passed as the first argument is correct.
- Use ls on the input directory to confirm all five files are present.
Example fix
// before dotnet run --project tools/Humanizer.UnicodeDataGenerator -- ./ucd // after # ensure all 5 files exist first ls ./ucd/UnicodeData.txt ./ucd/CaseFolding.txt ./ucd/Scripts.txt ./ucd/ScriptExtensions.txt ./ucd/DerivedNormalizationProps.txt dotnet run --project tools/Humanizer.UnicodeDataGenerator -- ./ucd
Defensive patterns
Strategy: validation
Validate before calling
static readonly string[] RequiredUcdFiles =
{
"UnicodeData.txt", "CaseFolding.txt", "Scripts.txt",
"ScriptExtensions.txt", "DerivedNormalizationProps.txt"
};
static bool AllUcdFilesPresent(string dir) =>
RequiredUcdFiles.All(f => File.Exists(Path.Combine(dir, f))); Prevention
- Automate UCD file download in your build script.
- Verify file presence before running the generator.
- Pin the download to the Unicode 16 release URL.
When it happens
Trigger: Running dotnet run --project tools/Humanizer.UnicodeDataGenerator -- <dir> when the directory is missing one or more UCD files. Also when the directory path is wrong or the files were not downloaded.
Common situations: Contributor runs the generator without first downloading the UCD files. Typo in the input directory path. Partial download that omitted a file. CI environment where the fetch step was skipped.
Related errors
- Unicode 16 input '{input.Key}' has SHA-256 {actual}; expecte
- Generated Unicode 16 inflection data is stale. Run the gener
- Could not find the Humanizer repository root from '{start}'.
AI-assisted analysis of Humanizr/Humanizer@ffc2b77c0f (2026-08-13).
Data as JSON: /api/errors/48cf700ce1a69d16.
Report an issue: GitHub.