pombreda / gcalcli

Automatically exported from code.google.com/p/gcalcli
0 stars 0 forks source link

Non-ascii character sets unsupported #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Make an entry in the calendar with non-ascii characters;
2. Use gcalcli to show an agenda containing the entry mentioned above.

What is the expected output? What do you see instead?

I expected gcalcli would support non-ascii character sets and showed the 
correct characters, without exiting with an error.

Instead gcalcli exits with the following error message:

[pedro@manchego ~]$ gcalcli calw

+----------+----------+----------+----------+----------+----------+----------+
|Sunday    |Monday    |Tuesday   |Wednesday |Thursday  |Friday    |Saturday  |
+----------+----------+----------+----------+----------+----------+----------+
| 9 Oct    |10 Oct    |11 Oct    |12 Oct ***|13 Oct    |14 Oct    |15 Oct    |
|          |          |          |          |          |          |          |
|6:00am    |          |10:00am   |          |          |          |8:15pm    |
Traceback (most recent call last):
  File "/usr/bin/gcalcli", line 1114, in <module>
    DoooooItHippieMonster()
  File "/usr/bin/gcalcli", line 1066, in DoooooItHippieMonster
    gcal.CalQuery(args[0])
  File "/usr/bin/gcalcli", line 819, in CalQuery
    self._GraphEvents(cmd, start, count, eventList)
  File "/usr/bin/gcalcli", line 594, in _GraphEvents
    PrintMsg(CLR_NRM(), line + "\n")
  File "/usr/bin/gcalcli", line 207, in PrintMsg
    sys.stdout.write(msg)
  File "/usr/lib/python2.7/codecs.py", line 351, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 180: 
ordinal not in range(128)

What version of the product are you using? On what operating system?

Version 1.4-4 in Archlinux up to date, as of 12/10/2011.

Please provide any additional information below.

Original issue reported on code.google.com by varelasa...@gmail.com on 12 Oct 2011 at 9:39

GoogleCodeExporter commented 9 years ago

1.4-4 is out of date in the AUR.  Install gcalcli-git from the AUR instead.  
This should fix your issue.

Original comment by eda...@insanum.com on 12 Oct 2011 at 9:43

GoogleCodeExporter commented 9 years ago
Please disregard the report above. I've just read the changelog of the latest 
version and apparently the issue is fixed.

Original comment by varelasa...@gmail.com on 12 Oct 2011 at 9:43

GoogleCodeExporter commented 9 years ago
Thanks.

Original comment by varelasa...@gmail.com on 12 Oct 2011 at 9:48

GoogleCodeExporter commented 9 years ago

Original comment by eda...@insanum.com on 12 Oct 2011 at 10:43

GoogleCodeExporter commented 9 years ago
I still have the same problem for 2.1 (check out git today).

Calendar used: 
https://www.google.com/calendar/ical/uqfc56j2qgtc382dsg9ph5rlek%40group.calendar
.google.com/public/basic.ics

gcalcli 2.1 (from git today)
Python 2.7
elementtree-1.2.7-20070827
gdata-2.0.14
python-dateutil-1.5

$./gcalcli --version
gcalcli v2.1 (Eric Davis)

$./gcalcli --cal galcli-problem calw 3

... many lines cut here ...

Traceback (most recent call last):
  File "./gcalcli", line 1512, in <module>
    BowChickaWowWow()
  File "./gcalcli", line 1457, in BowChickaWowWow
    gcal.CalQuery(args[0], count=int(args[1]))
  File "./gcalcli", line 999, in CalQuery
    self._GraphEvents(cmd, start, count, eventList)
  File "./gcalcli", line 700, in _GraphEvents
    PrintMsg(CLR_NRM(), line + "\n")
  File "./gcalcli", line 230, in PrintMsg
    sys.stdout.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 400-402: 
ordinal not in range(128)

Original comment by erik.westrup on 29 Oct 2011 at 6:14

Attachments: