Skip to content

Commit 4674b5c

Browse files
committed
Add separate test for the initial problem (passing); disable failing test
1 parent 1b6c6c0 commit 4674b5c

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
- Meinrad Recheis ([@henon](https://github.com/henon))
5656
- Mohamed Koubaa ([@koubaa](https://github.com/koubaa))
5757
- Patrick Stewart ([@patstew](https://github.com/patstew))
58+
- Peter Kese ([@patstew](https://github.com/pkese))
5859
- Raphael Nestler ([@rnestler](https://github.com/rnestler))
5960
- Rickard Holmberg ([@rickardraysearch](https://github.com/rickardraysearch))
6061
- Sam Winstanley ([@swinstanley](https://github.com/swinstanley))

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ One must now either use enum members (e.g. `MyEnum.Option`), or use enum constru
7171
- Exception stacktraces on `PythonException.StackTrace` are now properly formatted
7272
- Providing an invalid type parameter to a generic type or method produces a helpful Python error
7373
- Empty parameter names (as can be generated from F#) do not cause crashes
74+
- Unicode strings with surrogates get truncated when converting from Python
7475

7576
### Removed
7677

src/embed_tests/TestPyString.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ public void TestUnicode()
9696
}
9797

9898
[Test]
99+
public void TestUnicodeSurrogateToString()
100+
{
101+
var expected = "foo\ud83d\udc3c";
102+
var actual = PythonEngine.Eval("'foo\ud83d\udc3c'");
103+
Assert.AreEqual(4, actual.Length());
104+
Assert.AreEqual(expected, actual.ToString());
105+
}
106+
107+
[Test]
108+
[Ignore("Bug: Unicode conversion issue #1466")]
99109
public void TestUnicodeSurrogate()
100110
{
101111
const string expected = "foo\ud83d\udc3c"; // "foo🐼"

0 commit comments

Comments
 (0)