Bug 311416

Summary: __adjustPath fails on Python 3
Product: kde-windows Reporter: Peter Grasch <me>
Component: buildsystemAssignee: KDE-Windows <kde-windows>
Status: CONFIRMED ---    
Severity: normal CC: lpapp
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: Decode to byte array and re-encode result
Use c_wchar_p, a unicode- instead of a byte buffer and the unicode equivalents of the winapi

Description Peter Grasch 2012-12-09 14:59:47 UTC
__adjustPath does not work with the unicode strings that have been introduced with Python 3.

Reproducible: Always
Comment 1 Peter Grasch 2012-12-09 15:02:50 UTC
Created attachment 75752 [details]
Decode to byte array and re-encode result

Probably needs to be cleaned up, I'm just assuming iso-8859-15 / utf-8.
Comment 2 Laszlo Papp 2012-12-09 20:46:29 UTC
Thank you for your investigation. See my comments below:

1) decode is a noop as of now. :-)

2) Perhaps it would make more sense to use c_wchar_p and windll.kernel32.GetShortPathNameW(...).
Comment 3 Peter Grasch 2012-12-12 11:25:27 UTC
Hi Laszlo!

Good suggestion, I updated the patch accordingly.
Comment 4 Peter Grasch 2012-12-12 11:26:39 UTC
Created attachment 75795 [details]
Use c_wchar_p, a unicode- instead of a byte buffer and the unicode equivalents of the winapi
Comment 5 Justin Zobel 2021-03-09 23:42:32 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.