-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError in svn_utils.py:decode_as_string to crash #105
Comments
Original comment by philip_thiem (Bitbucket: philip_thiem, GitHub: Unknown): Thx Guy. I knew that there was a reason I didn't want to use getprefferedencoding. Will have to have a think on this one. Are you on a mac? I'm probably going to have to get my hands on an environment to do some experimenting on. |
Original comment by guyroz (Bitbucket: guyroz, GitHub: Unknown): Yes Philip I am using a Mac |
Original comment by philip_thiem (Bitbucket: philip_thiem, GitHub: Unknown): Thx, I think I will definitely take you up on that. It looks like between the various versions of pythons supported there are a number of "fun" nuisances with mac. Sufficiently old versions of python appear to bus error on certain calls even. I have a few ideas, but I figure that instead of guessing I might as well see how these things will behave. So I have an encoding test which I tossed together. Should be able to run it in a console with py26+ So if you would be so kind, ;), I would appreciate the output. |
Original comment by guyroz (Bitbucket: guyroz, GitHub: Unknown): here are the results:
Other interesting results:
|
Original comment by philip_thiem (Bitbucket: philip_thiem, GitHub: Unknown): Thank you! I find it interesting that the stdout.encoding is None when LC_ALL is given. That and I used the wrong category in my script. Here is a newer version which you can try, please, with and without LC_ALL=en_US. I think I've figured out how to possibly get a mac VM with travis-ci.org it feels like a bit of a hack to tell it that I need an objective-c environment, but should have access to at least py27 and py3 interpreter. |
Original comment by philip_thiem (Bitbucket: philip_thiem, GitHub: Unknown): Ok, got the vm's working. With 2.7 and 3.3 I get
Which I can't envision is right, however, US-ASCII should decode as UTF-8 and I'm pretty sure that osX pretty much enforces UTF-8 for the filesystem and tends to prefer that, so it might be a more reasonable default... Also seems like trying the nudge initialization of the locale with setlocale doesn't work thus far on any mac setup I've seen. ISO8859-1 is latin-1. LC_ALL=en_US.utf8 will probably get default encoding to return (en_us, utf-8).. |
Original comment by philip_thiem (Bitbucket: philip_thiem, GitHub: Unknown): https://bitbucket.org/pypa/setuptools/pull-request/26/svn-encoding-issues/diff
|
Originally reported by: guyroz (Bitbucket: guyroz, GitHub: Unknown)
locale.getpreferredencoding may return None (if LC_ALL= on Mac), causes svn_utils.py:decode_as_string to crash
The text was updated successfully, but these errors were encountered: