Skip to content

Unicode conversion issue #1466

Closed
Closed
@pkese

Description

@pkese

Environment

  • Pythonnet version: 3.0.0-preview2021-06-04
  • Python version: 3.8.8
  • Operating System: ubuntu 21.04
  • .NET Runtime: 5.0.300

Details

Unicode characters get lost / mangled during conversion:

scope.Exec("testStr = 'Nom 🍗';");
scope.Exec("""print("python:", testStr);""")
Console.WriteLine($"""dotnet: {scope.Get("testStr").ToString()}""");

writes

python: Nom 🍗
dotnet: Nom �

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions