We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d8f754 commit da051a9Copy full SHA for da051a9
1 file changed
src/embed_tests/TestPyString.cs
@@ -94,5 +94,15 @@ public void TestUnicode()
94
PyObject actual = new PyString(expected);
95
Assert.AreEqual(expected, actual.ToString());
96
}
97
+
98
+ [Test]
99
+ public void TestUnicodeSurrogate()
100
+ {
101
+ const string expected = "foo\ud83d\udc3c"; // "foo🐼"
102
+ PyObject actual = new PyString(expected);
103
+ // python treats "foo🐼" as 4 characters, dotnet as 5
104
+ Assert.AreEqual(4, actual.Length());
105
+ Assert.AreEqual(expected, actual.ToString());
106
+ }
107
108
0 commit comments