Show
Ignore:
Timestamp:
02/29/08 17:33:13 (2 years ago)
Author:
madarche
Message:

- Factorized the toLatin9 method in CPSUtil.text.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • CPS3/products/CPSOOo/trunk/OOoDocbookDocument.py

    r51948 r52633  
    11# -*- coding: ISO-8859-15 -*- 
    2 # (C) Copyright 2004-2007 Nuxeo SAS <http://nuxeo.com> 
     2# (C) Copyright 2004-2008 Nuxeo SAS <http://nuxeo.com> 
    33# Authors: 
    44# M.-A. Darche (Nuxeo) 
     
    3939 
    4040from Products.CMFCore.permissions import View 
     41from Products.CPSUtil.text import toLatin9 
    4142from Products.CPSDocument.CPSDocument import CPSDocument 
    4243 
     
    5859 
    5960log_key = 'OOoDocbookDocument' 
    60  
    61 def toLatin9(s): 
    62     if s is None: 
    63         return None 
    64     else: 
    65         # Replace RIGHT SINGLE QUOTATION MARK (unicode only) 
    66         # bythe APOSTROPHE (ascii and latin1). 
    67         # cf. http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 
    68         s = s.replace(u'\u2019', u'\u0027') 
    69         #&#8217; 
    70         return s.encode('iso-8859-15', 'ignore') 
    7161 
    7262def toUnicode(s):