[CalendarServer-dev] [Calendar and Contacts Server] #423: getIconPath does not cope with UTF-8 month names

Calendar and Contacts Server trac at macosforge.org
Thu Mar 17 15:26:04 PDT 2011


#423: getIconPath does not cope with UTF-8 month names
----------------------------------+-----------------------------------------
 Reporter:  mail@…                |       Owner:  wsanchez@…        
     Type:  Defect                |      Status:  new               
 Priority:  5: Not set            |   Milestone:                    
Component:  Calendar Server       |    Severity:  Other             
 Keywords:                        |       Radar:                    
----------------------------------+-----------------------------------------
 the getIconPath tries to look for an Icon with the month name in it.

 Does this really make sense does the apple version of the calendarserver
 have different icons per language??!

 I need:
 {{{
 Index: CalendarServer/twistedcaldav/mail.py
 ===================================================================
 --- CalendarServer/twistedcaldav/mail.py        (Revision 7209)
 +++ CalendarServer/twistedcaldav/mail.py        (Arbeitskopie)
 @@ -990,7 +990,7 @@
              with translationTo(language) as trans:
                  monthName = trans.monthAbbreviation(month)
              iconName = "%02d.png" % (day,)
 -            iconPath = os.path.join(iconDir, monthName, iconName)
 +            iconPath = os.path.join(iconDir, monthName.encode("utf-8"),
 iconName)
              if not os.path.exists(iconPath):
                  # Try the generic (numeric) version
                  iconPath = os.path.join(iconDir, "%02d" % (month,),
 iconName)
 }}}

-- 
Ticket URL: <http://trac.calendarserver.org/ticket/423>
Calendar and Contacts Server </>
HTTP/WebDAV/CalDAV Server


More information about the calendarserver-dev mailing list