Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

UTF-8 decoding #15

Open
rndev-io opened this issue Dec 11, 2015 · 6 comments
Open

UTF-8 decoding #15

rndev-io opened this issue Dec 11, 2015 · 6 comments

Comments

@rndev-io
Copy link

when i add task on russian language

$ ping-me -d November-24-2015 -t 14:30 привет
Traceback (most recent call last):
  File "/usr/local/bin/ping-me", line 9, in <module>
    load_entry_point('ping-me==0.2.1', 'console_scripts', 'ping-me')()
  File "/usr/local/lib/python2.7/dist-packages/ping_me/ping.py", line 46, in main
    ' ' + ' '.join(args.TIME))
  File "/usr/local/lib/python2.7/dist-packages/dateutil/parser.py", line 1003, in parse
    timestr = timestr.decode()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 23: ordinal not in range(128)
@harshcrop
Copy link
Contributor

what is the problem in UTF decoding ?? can you explain me?

@OrkoHunter
Copy link
Owner

I believe we need to declare UTF 8 encoding in the header for Python 2.
http://stackoverflow.com/questions/6289474/working-with-utf-8-encoding-in-python-source

@harshcrop
Copy link
Contributor

from future import unicode_literals can we use this for solution??

@OrkoHunter
Copy link
Owner

OrkoHunter commented Dec 22, 2016 via email

@harshcrop
Copy link
Contributor

ya, that i can do. can i add this line in ping.py file is that okay?

@OrkoHunter
Copy link
Owner

OrkoHunter commented Dec 22, 2016 via email

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

No branches or pull requests

3 participants