Issue 13662: os.listdir bug - Python tracker (original) (raw)

Created on 2011-12-26 05:38 by guxianminer, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg150252 - (view) Author: wang (guxianminer) Date: 2011-12-26 05:38
when I use os.list the return value is like this: ['some.xml', '\ufeff9158.xml'] but the file name have not the '\ufeff'. because this problem the script can't runing.
msg150254 - (view) Author: wang (guxianminer) Date: 2011-12-26 05:48
only I double click the script file generate this problem. in IDE not this problem.
msg150255 - (view) Author: wang (guxianminer) Date: 2011-12-26 05:54
I mean in IDLE can run ok. the '\ufeff' is still have.
msg150256 - (view) Author: wang (guxianminer) Date: 2011-12-26 05:54
I mean in IDLE can run ok. the '\ufeff' is still have.
msg150257 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-12-26 06:05
U+FFEF is a Unicode ZERO WIDTH NO-BREAK SPACE / BYTE ORDER MARK. I'm not sure what is it doing in the file name but this doesn't seem a bug in os.listdir.
msg150258 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-12-26 06:08
s/U+FFEF/U+FEFF/ See also http://unicode.org/faq/utf_bom.html#bom1
History
Date User Action Args
2022-04-11 14:57:25 admin set github: 57871
2011-12-26 06:08:01 ezio.melotti set messages: +
2011-12-26 06:05:34 ezio.melotti set status: open -> closednosy: + ezio.melottimessages: + resolution: not a bugstage: resolved
2011-12-26 05:56:10 guxianminer set components: + Windows
2011-12-26 05:54:37 guxianminer set messages: +
2011-12-26 05:54:33 guxianminer set messages: +
2011-12-26 05:48:40 guxianminer set messages: +
2011-12-26 05:38:46 guxianminer create