[Test]
public void Test_Unicode_CandidateNames()
{
var candidateName = new Language("RaĂșl", "en");
var candidate = new Candidate(
"candidate-1",
new InternationalizedText(new[] { candidateName }),
string.Empty,
string.Empty,
false);
List<Candidate> candidates = new List<Candidate>
{
candidate
};
var result = new Manifest(
"test-manifest",
ElectionType.general,
DateTime.Now,
DateTime.Now,
new GeopoliticalUnit[] { },
new Party[] { },
candidates.ToArray(),
new ContestDescription[] { },
new BallotStyle[] { },
new InternationalizedText(new Language[] { }),
new ContactInformation("na"));
var json = result.ToJson();
Assert.IsTrue(json.Contains("\"value\":\"Ra\\u00fal\""));
}
Is there an existing issue for this?
Current Behavior
.ToJson() converts
Ăș
to\\u00f
Expected Behavior
.ToJson() should convert
Ăș
to\u00f
Steps To Reproduce
The following test should pass:
Environment
Anything else?
No response