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.

Author ned.deily
Recipients benjamin.peterson, christian.heimes, irving, ned.deily
Date 2008-02-21.22:29:35
SpamBayes Score 0.0035343885
Marked as misclassified No
Message-id <1203632977.07.0.548671426929.issue2158@psf.upfronthosting.co.za>
In-reply-to
Content
I cannot reproduce the problem on Intel OSX 10.5.2 (Leopard) with either 
the built-in 2.5.1 or with the MacPython 2.5.1:
$ /usr/bin/python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> open(chr(212),'w')
<open file '?', mode 'w' at 0x7b2a8>

However, I can reproduce it on a 10.4.11 system (PPC) with the built-in 
2.3.5 or an earlier MacPython 2.4.4.

Further investigation with a simple C program shows similar behavior.

#include <stdio.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdlib.h>
#define PMODE 0644

int main(argc, argv)
int argc;
char *argv[];
{
    int f1;
    if ((f1 = creat(argv[1], PMODE))  == -1) {
        printf("can't create %s \n", argv[1]);
        exit(1);
    }
    printf("OK\n");
    exit(0);
}

On the 10.4.11 system, a creat fails with a similar file name:

$ cc --version
powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 
5367)
...
$ ./Testtest a
OK
pbg3:~ nad$ ./Testtest $'\xd4'
can't create ? 
pbg3:~ nad$

but on 10.5.2, it works:
$ cc --version
i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
...
$ ./Testtest a
OK
fimt:d nad$ ./Testtest $'\xd4'
OK

So perhaps this issue should be closed?
History
Date User Action Args
2008-02-21 22:29:37ned.deilysetspambayes_score: 0.00353439 -> 0.0035343885
recipients: + ned.deily, christian.heimes, benjamin.peterson, irving
2008-02-21 22:29:37ned.deilysetspambayes_score: 0.00353439 -> 0.00353439
messageid: <1203632977.07.0.548671426929.issue2158@psf.upfronthosting.co.za>
2008-02-21 22:29:36ned.deilylinkissue2158 messages
2008-02-21 22:29:35ned.deilycreate