fix(dotnet): preserve leading Unicode content in metadata strings (#667)

Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com>
This commit is contained in:
Rudy Mizrahi Celekli
2026-10-06 16:18:01 +08:00
committed by GitHub
parent 94cc8475e0
commit ddea06360a
5 changed files with 71 additions and 2 deletions
@@ -139,3 +139,19 @@ describe("managed artifact inventory", () => {
});
});
});
it("preserves U+FEFF in references and fixed attribute strings", () => {
const bytes = buildManagedPeFixture({
references: ["\uFEFFSystem.Runtime", "System.\uFEFFRuntime"],
targetFramework: "\uFEFF.NETCoreApp,Version=v8.0",
});
const result = inspectManagedArtifactBytes(
bytes,
managedPeFixtureTarget(bytes),
);
expect(result.references.map((reference) => reference.name)).toEqual([
"\uFEFFSystem.Runtime",
"System.\uFEFFRuntime",
]);
expect(result.target_frameworks).toEqual(["\uFEFF.NETCoreApp,Version=v8.0"]);
});