Issue6450
Created on 2009-07-09 18:49 by sandberg, last changed 2009-11-14 00:38 by ezio.melotti.
|
msg90341 - (view) |
Author: Erik Carstensen (sandberg) |
Date: 2009-07-09 18:49 |
|
On Linux, I get the following:
>>> import os
>>> os.path.normpath(u'/')
'/'
I would expect unicode to be mapped to unicode. os.path.abspath() has
the same problem, see also issue 3426.
This causes problems in my project, where a function requires its
parameters to be Unicode. Do the standard Python library functions that
operate on strings guarantee anything in general with respect to
conserving unicode? Can I make any assumption as to which codec was used
to encode the str returned from normpath?
|
|
msg90343 - (view) |
Author: Martin v. Löwis (loewis) |
Date: 2009-07-09 19:02 |
|
> Do the standard Python library functions that
> operate on strings guarantee anything in general with respect to
> conserving unicode? Can I make any assumption as to which codec was used
> to encode the str returned from normpath?
The bug tracker is not really a place to ask questions. Please ask them
on python-list or elsewhere, or read the source code of normpath.
|
|
msg94965 - (view) |
Author: Kuang-che Wu (kcwu) |
Date: 2009-11-06 10:37 |
|
see issue 5827, it includes a patch fixing this issue.
|
|
msg95222 - (view) |
Author: Ezio Melotti (ezio.melotti) |
Date: 2009-11-14 00:38 |
|
Closing this as duplicate of #5827.
|
|
| Date |
User |
Action |
Args |
| 2009-11-14 00:38:19 | ezio.melotti | set | status: open -> closed resolution: duplicate messages:
+ msg95222
superseder: os.path.normpath doesn't preserve unicode stage: test needed -> committed/rejected |
| 2009-11-06 10:37:32 | kcwu | set | nosy:
+ kcwu messages:
+ msg94965
|
| 2009-07-09 19:02:57 | loewis | set | nosy:
+ loewis messages:
+ msg90343
|
| 2009-07-09 19:02:07 | ezio.melotti | set | versions:
+ Python 2.7 nosy:
+ ezio.melotti
priority: normal components:
+ Unicode stage: test needed |
| 2009-07-09 18:49:55 | sandberg | create | |
|