Hello,
I have to digest an XML file that arrived with a UTF-8-BOM encoding. When I am outside of Rhino - using standard Python at a command prompt - I can open the file using this command:
FileHandle = open(Filename,"r", encoding='utf-8')
When I try the same command in Rhino it responds with the following error:
Message: open() got an unexpected keyword argument ‘encoding’
On the left side panel of the Python editor, if I click on <Python>, open it shows that the encoding parameter is not allowed. Although, at the very the bottom of the editor it provides a helpful link “more help on open can be found at:” which opens a web page showing the encoding parameter.
What is the story with the missing parameter? Is there a workaround for this?
Thanks for your suggestions.
2 posts - 2 participants