Author: remi
Date: 2009-09-28 01:24:20 +0200 (Mon, 28 Sep 2009)
New Revision: 5501

Modified:
   
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
   
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreter.py
   software_suite_v3/smart-core/smart-server/trunk/util/i18n/I18n.py
Log:
* Improved gadget messages encoding
* Fixed status bar glitches in TuxBox

Modified: 
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
      2009-09-25 10:04:13 UTC (rev 5500)
+++ 
software_suite_v3/smart-core/smart-server/trunk/resources/04_robot_content_interactions/00_resourceRobotContentInteractions.py
      2009-09-27 23:24:20 UTC (rev 5501)
@@ -587,15 +587,6 @@
             messages = pguContext.getMessagesHistory()
             result['count'] = len(messages)
             for i, message in enumerate(messages):
-                """
-                if not String.isUtf8(message):
-                    try:
-                        tmp = message.decode("latin-1", "ignore")
-                        message = tmp.encode("utf-8", "ignore")
-                    except:
-                        pass
-                message = String.toUtf8(message)
-                """
                 result['msg_%d' % i] = message
             return result
         self.__bfPguContextMutex.acquire()

Modified: 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreter.py
===================================================================
--- 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreter.py
     2009-09-25 10:04:13 UTC (rev 5500)
+++ 
software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/PluginInterpreter.py
     2009-09-27 23:24:20 UTC (rev 5501)
@@ -295,6 +295,11 @@
             self.__onPluginStartedCallback()
         while self.__getRun():
             line = self.__process.stdout.readline()
+            try:
+                tmp = line.decode("latin-1", "ignore")
+                line = tmp.encode("utf-8", "ignore")
+            except:
+                pass
             if len(line) == 0:
                 self.__setRun(False)
                 if self.__onPluginStoppedCallback != None:

Modified: software_suite_v3/smart-core/smart-server/trunk/util/i18n/I18n.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/util/i18n/I18n.py   
2009-09-25 10:04:13 UTC (rev 5500)
+++ software_suite_v3/smart-core/smart-server/trunk/util/i18n/I18n.py   
2009-09-27 23:24:20 UTC (rev 5501)
@@ -100,14 +100,6 @@
         value = value.replace("'", "''")
         for i, argument in enumerate(arguments):
             trArg = str(argument)
-            try:
-                # Some applications sends a mixed encoding. For example :
-                # Weather gadget (in french) sends message in utf-8 with
-                # arguments in latin-1 ...
-                trArg = trArg.decode("latin-1", "ignore")
-                trArg = trArg.encode("utf-8", "ignore")
-            except:
-                pass
             if self.__data.has_key(trArg):
                 trArg = self.__data[trArg]
             value = value.replace("{%d}" % i, trArg)


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to