[Calendar and Contacts Server] #409: Exception: Characterset does not work for french Translation
#409: Exception: Characterset does not work for french Translation ----------------------------------+----------------------------------------- Reporter: mail@… | Owner: wsanchez@… Type: Defect | Status: new Priority: 5: Not set | Milestone: Component: Calendar Server | Severity: Other Keywords: | Radar: ----------------------------------+----------------------------------------- I set Language to "fr" to test the localization. {{{ 2011-02-06 19:46:36+0100 [-] [mailgateway] 2011-02-06 19:46:36+0100 [-] [twext.web2.server#error] [Failure instance: Traceback: <type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode character u'\xe0' in position 5: ordinal not in range(128) 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twisted/internet/defer.py:345:errback 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twisted/internet/defer.py:424:_startRunCallbacks 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twisted/internet/defer.py:441:_runCallbacks 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twisted/internet/defer.py:949:gotResult 2011-02-06 19:46:36+0100 [-] [mailgateway] --- <exception caught here> --- 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twisted/internet/defer.py:891:_inlineCallbacks 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twisted/python/failure.py:338:throwExceptionIntoGenerator 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twistedcaldav/resource.py:309:renderHTTP 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twisted/internet/defer.py:891:_inlineCallbacks 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twisted/python/failure.py:338:throwExceptionIntoGenerator 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twext/web2/static.py:127:renderHTTP 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twisted/internet/defer.py:891:_inlineCallbacks 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twisted/python/failure.py:338:throwExceptionIntoGenerator 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twext/web2/resource.py:109:renderHTTP 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twisted/internet/defer.py:893:_inlineCallbacks 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twistedcaldav/mail.py:334:http_POST 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twistedcaldav/mail.py:940:outbound 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/site- packages/twistedcaldav/mail.py:1029:generateEmail 2011-02-06 19:46:36+0100 [-] [mailgateway] /usr/lib/python2.6/encodings/utf_8.py:16:decode 2011-02-06 19:46:36+0100 [-] [mailgateway] ] }}} This can be reproduced by {{{
u"à".decode("utf-8") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 0: ordinal not in range(128) }}}
-- Ticket URL: <http://trac.calendarserver.org/ticket/409> Calendar and Contacts Server </> HTTP/WebDAV/CalDAV Server
#409: Exception: Characterset does not work for french Translation ----------------------------------+----------------------------------------- Reporter: mail@… | Owner: wsanchez@… Type: Defect | Status: new Priority: 5: Not set | Milestone: Component: Calendar Server | Severity: Other Keywords: | Radar: ----------------------------------+----------------------------------------- Comment(by mail@…): With {{{ Index: CalendarServer/twistedcaldav/mail.py =================================================================== --- CalendarServer/twistedcaldav/mail.py (Revision 6892) +++ CalendarServer/twistedcaldav/mail.py (Arbeitskopie) @@ -1024,10 +1024,6 @@ else: formatString = _("Event reply: %(summary)s") - # The translations we get back from gettext are utf-8 encoded - # strings, so convert to unicode - formatString = formatString.decode("utf-8") - details['subject'] = msg['Subject'] = formatString % { 'summary' : details['summary'] } }}} it works for me and the mails are nicely displayed. But maybe the have a bad encoding ... -- Ticket URL: <http://trac.calendarserver.org/ticket/409#comment:1> Calendar and Contacts Server </> HTTP/WebDAV/CalDAV Server
#409: Exception: Characterset does not work for french Translation ----------------------------------+----------------------------------------- Reporter: mail@… | Owner: wsanchez@… Type: Defect | Status: new Priority: 5: Not set | Milestone: Component: Calendar Server | Severity: Other Keywords: | Radar: ----------------------------------+----------------------------------------- Comment(by mail@…): probably the same as #442 -- Ticket URL: <http://trac.calendarserver.org/ticket/409#comment:2> Calendar and Contacts Server </> HTTP/WebDAV/CalDAV Server
#409: Exception: Characterset does not work for french Translation ----------------------------------+----------------------------------------- Reporter: mail@… | Owner: sagen@… Type: Defect | Status: new Priority: 2: Expected | Milestone: CalendarServer-3.x Component: Calendar Server | Severity: Other Keywords: | Radar: ----------------------------------+----------------------------------------- Changes (by wsanchez@…): * owner: wsanchez@… => sagen@… * priority: 5: Not set => 2: Expected * milestone: => CalendarServer-3.x -- Ticket URL: <http://trac.calendarserver.org/ticket/409#comment:3> Calendar and Contacts Server </> HTTP/WebDAV/CalDAV Server
#409: Exception: Characterset does not work for french Translation ----------------------------------+----------------------------------------- Reporter: mail@… | Owner: glyph@… Type: Defect | Status: new Priority: 2: Expected | Milestone: CalendarServer-3.x Component: Calendar Server | Severity: Other Keywords: | Radar: ----------------------------------+----------------------------------------- Changes (by wsanchez@…): * owner: sagen@… => glyph@… -- Ticket URL: <http://trac.calendarserver.org/ticket/409#comment:4> Calendar and Contacts Server </> HTTP/WebDAV/CalDAV Server
#409: Exception: Characterset does not work for french Translation ----------------------------------+----------------------------------------- Reporter: mail@… | Owner: glyph@… Type: Defect | Status: new Priority: 2: Expected | Milestone: CalendarServer-3.2 Component: Calendar Server | Severity: Other Keywords: | Radar: ----------------------------------+----------------------------------------- Changes (by wsanchez@…): * milestone: CalendarServer-3.x => CalendarServer-3.2 -- Ticket URL: <http://trac.calendarserver.org/ticket/409#comment:5> Calendar and Contacts Server </> HTTP/WebDAV/CalDAV Server
#409: Exception: Characterset does not work for french Translation ----------------------------------+----------------------------------------- Reporter: mail@… | Owner: sagen@… Type: Defect | Status: new Priority: 2: Expected | Milestone: CalendarServer-3.2 Component: Calendar Server | Severity: Other Keywords: | Radar: ----------------------------------+----------------------------------------- Changes (by wsanchez@…): * owner: glyph@… => sagen@… -- Ticket URL: <http://trac.calendarserver.org/ticket/409#comment:6> Calendar and Contacts Server </> HTTP/WebDAV/CalDAV Server
participants (1)
-
Calendar and Contacts Server