[issue37939] os.path.normpath change some characters of a path into kinda 'hex number'

2019-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: 3.5 (and 3.6) only gets security fixes. From the report, the bug is fixed in 3.7. FWIW, I agree about the 9-bit octal thing. There is another issue about this. -- nosy: +terry.reedy resolution: -> out of date stage: -> resolved status: open -> cl

[issue37939] os.path.normpath change some characters of a path into kinda 'hex number'

2019-08-24 Thread Eryk Sun
Eryk Sun added the comment: >\N{name} : named character >\U : 32-bit hexadecimal ordinal (e.g. \U0010) >\u : 16-bit hexadecimal ordinal (e.g. \u) >\xXX : 8-bit hexadecimal ordinal (e.g. \xff) >\OOO : 9-bit octal ordinal (e.g. \777) >

[issue37939] os.path.normpath change some characters of a path into kinda 'hex number'

2019-08-24 Thread Eryk Sun
Eryk Sun added the comment: As Karthikeyan noted, in a regular string literal, backslash is an escape character that's used in the following escape sequences: \N{name} : named character \U : 32-bit hexadecimal ordinal (e.g. \U0010) \u : 16-bit hexadecimal ord

[issue37939] os.path.normpath change some characters of a path into kinda 'hex number'

2019-08-24 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I guess '\f' translates to \x0c and using raw string helps with this. >>> ord('\f') 12 >>> '\f' '\x0c' >>> var = "d:\stuff\morestuff\furtherdown\THEFILE.txt" >>> var 'd:\\stuff\\morestuff\x0curtherdown\\THEFILE.txt' >>> print(os.path.normpath(var)) d

[issue37939] os.path.normpath change some characters of a path into kinda 'hex number'

2019-08-24 Thread Yugi
New submission from Yugi : I was trying to handle path to work on both '/' and '\' but when I tried to run the code like they said on: https://stackoverflow.com/questions/3167154/how-to-split-a-dos-path-into-its-components-in-python I have no idea why the terminal on my PC doesnt have the same