- Notifications
You must be signed in to change notification settings - Fork750
Closed
Description
Environment
- Pythonnet version: 2.4.0.dev0 (master; #19d854c)
- Python version: 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)]
- Operating System: Windows 10 Pro 64 Bit (1803; 17134.5)
Details
- Describe what you were trying to get done.
- Just call
str
python built-in function with C# class - Raise UnicodeDecodeError if value is
안녕
- Return
안녕PADD
if value is `안녕PADDINGX"
It seems like failure str convert with ToString() function only.
(Another method, nor read value does not problem)
- What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
namespaceHello{publicclassWorld{publicstringvalue="안녕";publicstringGetString(){returnvalue;}publicoverridestringToString(){returnvalue;}}}
importclrclr.AddReference("hello")fromHelloimportWorldworld=World()print(1,str(world.value))print(2,str(world.GetString()))print(3,str(world))
- If there was a crash, please include the traceback here.
1안녕2안녕Traceback (mostrecentcalllast):File"main.py",line7,in<module>str(hello)UnicodeDecodeError:'utf-8'codeccan'tdecodebytesinposition0-1:unexpectedendofdata
Metadata
Metadata
Assignees
Labels
No labels