Closed GoogleCodeExporter closed 9 years ago
Original comment by insa...@gmail.com
on 5 Oct 2007 at 5:25
In order for me to reproduce this problem could you create a new public
calendar and
duplicate the event on it. Then I'll subscribe and see what's up with this
unicode
issue...
Original comment by insa...@gmail.com
on 8 Oct 2007 at 2:23
I'm having the same problem. You can reproduce it by using å, ä or ö in an
event. Do
you know of some quick fix to this problem, or will we have to wait for it to
hopefully be resolved in the next version?
Original comment by niklas.b...@gmail.com
on 23 Oct 2007 at 12:14
Forgot to mention that I found a solution to this problem. change "sys.stdout =
codecs.getwriter(locale.getpreferredencoding())(sys.stdout)" on line 66 to
"sys.stdout = codecs.getwriter('utf-8')(sys.stdout)". This sets the character
encoding to UTF-8. You might want use UTF-8 for input as well - do this by
changing
line 67 to "sys.stdin = codecs.getreader('utf-8')(sys.stdin)"
Original comment by niklas.b...@gmail.com
on 5 Nov 2007 at 6:32
I have the same problem. The changes proposed by Niklas does not fix the
problem for
me. This unfortunately makes gcalcli unusable for me...
Original comment by DanielLi...@gmail.com
on 14 Jan 2008 at 2:05
In gcalcli you could had :
import atom
atom.XML_STRING_ENCODING = None
It works for me...
Original comment by tho...@montfort.fr
on 30 Jan 2008 at 10:06
I have the same problem, and after I remove the two lines:
sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
sys.stdin = codecs.getreader(locale.getpreferredencoding())(sys.stdin)
then it works.
Original comment by liuzhong...@gmail.com
on 28 Mar 2008 at 8:49
I have another workaround:
Put following lines into site-packages/sitecustomize.py
see http://www.faqs.org/docs/diveintopython/kgp_unicode.html
import os, sys
if 'UTF-8' in os.environ['LANG']:
sys.setdefaultencoding('utf-8')
Original comment by kuang...@gmail.com
on 10 May 2008 at 10:55
I had a similar problem but with UnicodeDecodeError. Doing
import atom
atom.XML_STRING_ENCODING = None
atom.XML_STRING_DECODING = None
Fixed it for me
Original comment by Quazie
on 18 May 2008 at 5:36
Still does not work for me. Have changed the stdin &stdut lines as suggested
here and
added the imort atom at the beginning of the script.
Here's the result of 'gcalcli --cals owner calw':
"UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 48:
ordinal not
in range(128)"
Any more hints?
Original comment by h3L93.ph1l1pp@gmail.com
on 30 Jun 2008 at 5:28
Would it help if I set up a brand new calendar for you, insanum, to reproduce
the error?
Original comment by h3L93.ph1l1pp@gmail.com
on 23 Jul 2008 at 7:11
Yet another fix?
Modified PrintMsg as follows:
def PrintMsg(color, msg):
if CLR.useColor:
sys.stdout.write(str(color))
sys.stdout.write(unicode(msg, errors="ignore"))
sys.stdout.write(str(CLR_NRM()))
else:
sys.stdout.write(unicode(msg, errors="ignore"))
Cheers,
Matt
Original comment by mbaker....@gmail.com
on 10 Mar 2009 at 11:44
mbaker.pdx seems to have the best result for me, it also seems to be truest to
what
the output is expected to be.
Thanks,
Stefan
Original comment by iamnafets
on 1 Apr 2009 at 11:38
default sys.stdout can write string
the alternate sys.stdout
codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
can write unicode, but msg is a string (not unicode) so we have either to use
the
standard sys.stdout, or convert it back to unicode and use:
sys.stdout.write(unicode(msg,locale.getpreferredencoding()))
If you use utf-8 just commenting the two initial lines
sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout)
sys.stdin = codecs.getreader(locale.getpreferredencoding())(sys.stdin)
must work,
If you have to switch encoding between the calendar and your console you will
probably have to reencode the msg.
Original comment by marc.zon...@gmail.com
on 15 Apr 2009 at 5:52
mbaker.pdx's modification to PrintMsg() does indeed get rid of the error for
me, but
the Japanese characters present in my calendar items are not displayed (they
are blank).
Original comment by tacomana...@gmail.com
on 20 May 2009 at 6:25
Kuangche's solution (see comment 8) should be the most elegant one. Works for me
well. (Though I had to add the lines to /etc/python2.6/sitecustomize.py). thx.
Original comment by lupusinclitos
on 14 Jul 2009 at 10:32
Comment 4 worked for me. Freebsd 7.2 i386, Python 2.6.2, gcalcli 1.4.2.
None of the others did.
Thanks.
Original comment by vvaauugg...@gmail.com
on 4 Nov 2009 at 11:38
I confirme that adding:
import os, sys
if 'UTF-8' in os.environ['LANG']:
sys.setdefaultencoding('utf-8')
to /etc/python2.6/sitecustomize.py resolved my issue.
I also tried a lot of other workaround that worked some of the times but not
always.
This one is the moste stable. It worked on a unmodified version of gcalcli
1.4.1 on
ubuntu 9.04.
Original comment by bastien...@gmail.com
on 4 Dec 2009 at 10:31
I confirm that commenting out lines 66 and 67 (sys.std...) worked for me.
v1.4
gentoo
Original comment by gross.jo...@gmail.com
on 11 Feb 2010 at 11:12
[deleted comment]
Commented out lines 66 and 67 as well, worked.
Yet, when using a ‘cal’ command, the columns separators are broken if a
line contains
special characters, since it obviously calculates a width of 2 characters for
one
“special” unicode character.
Original comment by jfgr...@gmail.com
on 11 May 2010 at 10:13
Same error with gcalcli 1.4-4 and python2 2.7.1.
The problem: I don't have a sitecustomize.py ^^
Original comment by thms.eb...@gmail.com
on 15 Feb 2011 at 5:08
Comment 12 fixed the issue for me.
Original comment by schara...@gmail.com
on 11 Jul 2011 at 8:34
Original comment by eda...@insanum.com
on 31 Jul 2011 at 8:15
Issue 18 has been merged into this issue.
Original comment by eda...@insanum.com
on 31 Jul 2011 at 5:19
Issue 29 has been merged into this issue.
Original comment by eda...@insanum.com
on 31 Jul 2011 at 5:20
Issue 31 has been merged into this issue.
Original comment by eda...@insanum.com
on 31 Jul 2011 at 5:24
Issue 39 has been merged into this issue.
Original comment by eda...@insanum.com
on 31 Jul 2011 at 5:25
Issue 41 has been merged into this issue.
Original comment by eda...@insanum.com
on 31 Jul 2011 at 5:25
Issue 67 has been merged into this issue.
Original comment by eda...@insanum.com
on 31 Jul 2011 at 5:26
Fixed for the most part. There is still an issue with wider east asian
characters in the calw and calm output. A patch for an older version of
gcalcli can be found in issue 31.
I'm closing this issue out and opening a new one specifically for east asian
characters.
Original comment by eda...@insanum.com
on 2 Aug 2011 at 6:04
I still have this problem. No wider east Asian characters.
gcalcli 2.1
Python 2.7
elementtree-1.2.7-20070827
gdata-2.0.14
python-dateutil-1.5
Original comment by erik.westrup
on 7 Sep 2011 at 11:18
Please open a new issue specifically for v2.1 of gcalcli. Provide the
resulting stack trace and most importantly, create and share a calendar which
contains an event that exposes your problem. Thanks.
My tests didn't expose a problem so there must be an edge case you're
experiencing.
Original comment by eda...@insanum.com
on 7 Sep 2011 at 11:29
Original issue reported on code.google.com by
iliyan.j...@gmail.com
on 4 Oct 2007 at 3:05