Changeset 77cb9e in indico


Ignore:
Timestamp:
05/17/10 19:24:14 (3 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, new-webex, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
9729e8
Parents:
84c86e
Message:

[FIX] UTF-8 splitting for strings in PDF title

  • otherwise utf-8 error is raised;
File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/PDFinterface/conference.py

    r121c3a r77cb9e  
    1818## along with CDS Indico; if not, write to the Free Software Foundation, Inc., 
    1919## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 
    20 from MaKaC.common import logger 
    21  
     20from MaKaC.common import logger, utils 
    2221import string 
    2322import types 
     
    395394        title = doc.getCurrentPart() 
    396395        if len(doc.getCurrentPart())>50: 
    397             title = doc.getCurrentPart()[:50] + "..." 
     396            title = utils.unicodeSlice(doc.getCurrentPart(), 0, 50) + "..." 
    398397        c.drawRightString(self._PAGE_WIDTH - inch, self._PAGE_HEIGHT - 0.75 * inch, "%s"%title) 
    399398        c.drawRightString(self._PAGE_WIDTH - inch, 0.75 * inch, _(""" _("Page") %d """)%doc.page) 
Note: See TracChangeset for help on using the changeset viewer.