Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unicode conversion issueΒ #1466

@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