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

Problem parsing european letters such as åäö #38

Closed
tomeriksen opened this issue Sep 21, 2015 · 2 comments
Closed

Problem parsing european letters such as åäö #38

tomeriksen opened this issue Sep 21, 2015 · 2 comments

Comments

@tomeriksen
Copy link

I'm from Sweden. In Sweden we use weird letters like åäö. Så when clients are called "Lantmännen" with projects called "Höstkampanj" you run into problems with toggl-cli. This happens when I try to access my company's toggl:

toggl clients
Traceback (most recent call last):
File "toggl.py", line 1181, in
CLI().act()
File "toggl.py", line 989, in act
print(ClientList())
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 281: ordinal not in range(128)

I'm not very familiar with python, but this seems to do the trick (line 493):

return s.rstrip().encode('utf-8')

Since I'm no pro at python, nor git, I think it's smarter if someone else solved this issue properly.

@drobertadams
Copy link
Collaborator

Actually, that will just strip off the last character. I'll have a look.

@tomeriksen
Copy link
Author

No, it works:

toggl-cli>python toggl.py projects
:Monterosa's workspace @Vapiano - Strategi - Vapiano
:Monterosa's workspace @Organisation Chart - Design updates - Ikano
:Monterosa's workspace @Berättareministeriet - King
:Monterosa's workspace @VAB (Vård av sjukt barn) - Monterosa
....

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