pythonnet / clr-loader

Loader for different .NET runtimes
MIT License
32 stars 23 forks source link

fix path encoding problems #61

Closed AndersonBY closed 1 year ago

filmor commented 1 year ago

Did you actually test this? Why should this work?

AndersonBY commented 1 year ago

Tested with two computers. One is set to utf8 encoding on Windows. One is default encoding. Both Windows are in Chinese. Default encoding on Chinese Windows is gbk. That's the problem causing error on path containing Chinese characters.

filmor commented 1 year ago

That's all fine, but the path is taken from a unicode string and passed to a function that decodes it from UTF8 again...

AndersonBY commented 1 year ago

Sorry I didn't dive deep into this. But it does fix my problems with Chinese characters in the path. I was using pywebview which deeps on pythonnet and it has some problems with Chinese characters' path. And the traceback points out here.

link89 commented 1 year ago

Confirm that this patch does fix the issue: https://github.com/pythonnet/clr-loader/issues/59 Hope to be included in the next release.

link89 commented 1 year ago

Hi @filmor Do you have plan to accept this PR and make a new release?

filmor commented 1 year ago

Superceded by #62, sorry for the long delay and thank you for your effort :)