[issue14986] print() fails on latin1 characters on OSX

2012-06-03 Thread Adrian Bastholm
Adrian Bastholm added the comment: Thanks a lot for the help, guys ! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Ned Deily
Ned Deily added the comment: I'm neither a PyDev nor an Eclipse user but there should be some way to set environment variables in it. Undoubtedly, Eclipse is launched as an app so a shell is not involved and shell profile files are not processed. However, the "Environment" section of this t

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Hynek Schlawack
Hynek Schlawack added the comment: Glad we could help. I suspected it was running under "special circumstances". -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker _

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Adrian Bastholm
Adrian Bastholm added the comment: my code runs fine in a console window, so it's some kind of configuration error. Sorry for wasting your time guys .. It would be nice to know why PyDev is not setting the right environment vars though .. >>> traverse(".") Processing ./.DS_Store Traversing ./

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Adrian Bastholm
Adrian Bastholm added the comment: Output in console: Python 3.2.3 (v3.2.3:3d0686d90f55, Apr 10 2012, 11:25:50) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> print(sys.stdout) <_io.TextIOWrapper n

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Ned Deily
Ned Deily added the comment: The character in question is not the problem and the code snippet you provide looks fine. The problem is almost certainly that you are running the code in an execution environment where the LANG environment variable is either not set or is set to an encoding that

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Adrian Bastholm
Adrian Bastholm added the comment: The last post is the CAPITAL Å. The following is the small letter "å" U+00E5 LATIN SMALL LETTER A WITH RING ABOVE General Character Properties In Unicode since: 1.1 Unicode category: Letter, Lowercase Canonical decomposition: U+0061 LATIN SMALL LETTER A + U+03

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Adrian Bastholm
Adrian Bastholm added the comment: The char in question: 'å'. It is a folder with this character in the name. My encoding is UTF-8. Running print("\u030a") gives a blank line U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE General Character Properties In Unicode since: 1.1 Unicode category: Lett

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Ned Deily
Ned Deily added the comment: mac_roman is an obsolete encoding from Mac OS 9 days; it is seldom seen on modern OS X systems. But it is often the fallback encoding set in ~/.CFUserTextEncoding if the LANG or a LC_* environment variable is not set (see, for example, http://superuser.com/questi

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Hynek Schlawack
Hynek Schlawack added the comment: '\u030a' can’t be latin1 as 0x030a = 778 which is waaay beyond 255. :) That's gonna be utf-8 and indeed that maps to " ̊". My best guess is that your LC_CTYPE is set to Mac Roman. You can check it using "import os;os.environ.get('LC_CTYPE')". Try running py

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread R. David Murray
R. David Murray added the comment: A mac expert can confirm, but I think that just means that the default mac_roman encoding (which is made the default by the OS, if I understand correctly) can't handle that character. I believe it will work if you use utf-8. And no, I don't know how to do

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Adrian Bastholm
New submission from Adrian Bastholm : print(listentry) fails on folder name with swedish (latin1) characters Error: File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/encodings/mac_roman.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_tab