iro/offer/smstrade.py
branchdevel
changeset 236 63662db5ff25
parent 220 602720314930
child 244 48fba7b4afe9
--- a/iro/offer/smstrade.py	Wed Mar 21 17:30:16 2012 +0100
+++ b/iro/offer/smstrade.py	Wed Mar 21 17:32:14 2012 +0100
@@ -127,7 +127,7 @@
        
         length=len(sms.content)
         for s in doubleChar:
-            length += sms.content.count(s)
+            length += sms.content.encode("utf-8").count(s)
         parameters["concat_sms"] = True if length > 160 else False
 
         ps={}
@@ -142,7 +142,7 @@
         params = urllib.urlencode(ps)
         #dp=copy.deepcopy(ps)
         #dp["key"]="<KEY>"
-        #logger.debug('smstrade._send-parameters:%s\n\t->%s'%(str(dp), urllib.urlencode(dp)) )
+        #print 'smstrade._send-parameters:%s\n\t->%s'%(str(dp), urllib.urlencode(dp))
         
         response = urllib.urlopen(self.url, params)
         data = response.readlines()