This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: ntpath.splitdrive() fails when UNC part contains \u0130
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.3, Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2013-12-06 18:18 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
ntpath_splitdrive_u0130.patch serhiy.storchaka, 2013-12-06 18:39 review
Messages (3)
msg205392 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-12-06 18:18
ntpath.splitdrive() returns wrong result when UNC part contains LATIN CAPITAL LETTER I WITH DOT ABOVE ('İ', '\u0130').

>>> ntpath.splitdrive('//host/I/abc')
('//host/I', '/abc')
>>> ntpath.splitdrive('//host/İ/abc')
('//host/İ/', 'abc')
>>> ntpath.splitdrive('//host/İİ/abc')
('//host/İİ/a', 'bc')
>>> ntpath.splitdrive('//host/İİİ/abc')
('//host/İİİ/ab', 'c')

This is because ntpath.splitdrive() find an index for a split in normcased path and len('\u0130'.lower()) != 1.
msg205393 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-12-06 18:39
Here is a patch.
msg206304 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-12-16 13:22
New changeset 7b0d083082ea by Serhiy Storchaka in branch '3.3':
Issue #19911: ntpath.splitdrive() now correctly processes the 'İ' character

New changeset 63d769dfa4ef by Serhiy Storchaka in branch 'default':
Issue #19911: ntpath.splitdrive() now correctly processes the 'İ' character
Date User Action Args
2022-04-11 14:57:55adminsetgithub: 64110
2013-12-16 13:27:15serhiy.storchakasetversions: - Python 2.7
2013-12-16 13:26:19serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2013-12-16 13:22:48python-devsetnosy: + python-dev
messages: + msg206304
2013-12-06 19:03:05serhiy.storchakalinkissue19912 dependencies
2013-12-06 18:39:18serhiy.storchakasetfiles: + ntpath_splitdrive_u0130.patch
messages: + msg205393

assignee: serhiy.storchaka
keywords: + patch
stage: needs patch -> patch review
2013-12-06 18:18:26serhiy.storchakacreate