Ned Deily added the comment:

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?

----------
nosy: +nad

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2158>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to