Skip to content
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

Unicode chars in source file #1

Open
spulec opened this issue Mar 11, 2013 · 2 comments
Open

Unicode chars in source file #1

spulec opened this issue Mar 11, 2013 · 2 comments

Comments

@spulec
Copy link

spulec commented Mar 11, 2013

The json.dumps() in api.py blows up if there is a unicode char in one of the source files. My fork has a fix that works for me, but I didn't get a chance to update the tests.

Cool library.

@z4r
Copy link
Owner

z4r commented Mar 12, 2013

Hi,
could you write an example of broken code?
I added this file and it just works

# coding=utf-8
EUR = "€"


def amount(tariff, currency=EUR):
    return '{0} {1:.2f}'.format(currency, float(tariff))

@spulec
Copy link
Author

spulec commented Mar 12, 2013

Hey, sorry for the shitty bug report. I originally thought the issue was simpler than what it actually appears to be.

The file in question is dateutil/parser. The encoding is iso-8859-1. Not sure why someone would do that, but alas.

The broken Travis traceback is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants