Date: Sun, 6 Jul 2008 13:15:33 +0800 (CST) From: Yi-Jheng Lin <yzlin@cs.nctu.edu.tw> To: FreeBSD-gnats-submit@FreeBSD.org Cc: lwhsu@FreeBSD.org Subject: ports/125327: [PATCH] deskutils/gcalcli: fix unicode supporting Message-ID: <200807060515.m665FXhj010888@stucgi.cs.nctu.edu.tw> Resent-Message-ID: <200807060530.m665U9Bc020858@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 125327 >Category: ports >Synopsis: [PATCH] deskutils/gcalcli: fix unicode supporting >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jul 06 05:30:08 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Yi-Jheng Lin >Release: FreeBSD 7.0-RELEASE-p1 amd64 >Organization: NCTU CS >Environment: System: FreeBSD stucgi 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #0: Thu Apr 17 15:56:39 CST 2008 >Description: [DESCRIBE CHANGES] In Python's default setting, the default string encoding is 'ascii'. The gcalcli shows "UnicodeEncodeError" when dealing with non-ASCII strings. This problem would occur when the event title or content includes non-ASCII characters. I also sent this patch to the author, Eric Davis <insanum@gmail.com>, and hope it will be fixed in next release. Added file(s): - files/patch-gcalcli Port maintainer (lwhsu@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- gcalcli-1.4_1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/deskutils/gcalcli/files/patch-gcalcli /amd/account/gcs/96/9655630/dev/ports/deskutils/gcalcli/files/patch-gcalcli --- /usr/ports/deskutils/gcalcli/files/patch-gcalcli 1970-01-01 08:00:00.000000000 +0800 +++ /amd/account/gcs/96/9655630/dev/ports/deskutils/gcalcli/files/patch-gcalcli 2008-07-06 12:32:55.000000000 +0800 @@ -0,0 +1,33 @@ +--- gcalcli.orig 2008-07-06 12:29:27.000000000 +0800 ++++ gcalcli 2008-07-06 12:31:38.000000000 +0800 +@@ -195,25 +195,25 @@ + def PrintErrMsg(msg): + if CLR.useColor: + sys.stdout.write(str(CLR_BRRED())) +- sys.stdout.write(msg) ++ sys.stdout.write(unicode(msg, 'UTF-8')) + sys.stdout.write(str(CLR_NRM())) + else: +- sys.stdout.write(msg) ++ sys.stdout.write(unicode(msg, 'UTF-8')) + + + def PrintMsg(color, msg): + if CLR.useColor: + sys.stdout.write(str(color)) +- sys.stdout.write(msg) ++ sys.stdout.write(unicode(msg, 'UTF-8')) + sys.stdout.write(str(CLR_NRM())) + else: +- sys.stdout.write(msg) ++ sys.stdout.write(unicode(msg, 'UTF-8')) + + + def DebugPrint(msg): + return + sys.stdout.write(str(CLR_YLW())) +- sys.stdout.write(msg) ++ sys.stdout.write(unicode(msg, 'UTF-8')) + sys.stdout.write(str(CLR_NRM())) + + --- gcalcli-1.4_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807060515.m665FXhj010888>