[pywin32-bugs] [ pywin32-Bugs-3564984 ] GetShortPathName returns incorrect result for baltic 8.3
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2012-09-05 23:11:56
|
Bugs item #3564984, was opened at 2012-09-05 04:34 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3564984&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Pavel () Assigned to: Nobody/Anonymous (nobody) Summary: GetShortPathName returns incorrect result for baltic 8.3 Initial Comment: GetShortPathName() returns incorrect result for 8.3 baltic file names. The returned value still contains baltic symbols although it must not. For "õ2345678.txt" it returns "õ2345678.txt" (should be "234567~1.TXT) For "õ23456789.txt" it returns "234567~2.TXT" (correct) To reproduce the bug please run reproduce.bat from the archive attached. (Baltic file names should be preserved with 7zip I believe.) Python 2.7.3, Russian Windows 7 32 bit, PyWin32 ver. 217 (Sorry, I could not find how to reopen a bug at SF.) ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-09-05 16:11 Message: pywin32 is just a thin wrapper around the windows function, so I believe that the Windows implementation of GetShortPathName is what you believe is wrong. Note that the MS docs say: * If the specified path is already in its short form and conversion is not needed, the function simply copies the specified path to the buffer specified by the lpszShortPath parameter. * Use any character in the current code page for a name, including Unicode characters and characters in the extended character set (128–255), except for [some special chars] So I think that the first example is already a valid short name. I'm afraid you probably need to demonstrate that calling GetShortPathName some other way (ie, not via pywin32) is returning a different value than when calling it via pywin32 before I can consider it a pywin32 issue. ---------------------------------------------------------------------- Comment By: Pavel () Date: 2012-09-05 13:54 Message: I didn't know someone could disable short file names. Anyway files on my computer are accessible via short names. ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2012-09-05 08:32 Message: I get the expected result for both files. If you have short file names disabled, it's possible to have files that do not have an 8.3 name. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3564984&group_id=78018 |