Update of /cvsroot/freevo/freevo/src/util
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1453/util

Modified Files:
        __init__.py mediainfo.py 
Log Message:
more unicode fixes

Index: __init__.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/util/__init__.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** __init__.py 25 Feb 2004 19:50:51 -0000      1.13
--- __init__.py 27 Feb 2004 20:15:03 -0000      1.14
***************
*** 11,14 ****
--- 11,17 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.14  2004/02/27 20:15:03  dischi
+ # more unicode fixes
+ #
  # Revision 1.13  2004/02/25 19:50:51  dischi
  # fix unicode problem for utf-8
***************
*** 67,71 ****
  
      def Unicode(string, encoding=config.encoding):
!         if type(string) == str:
              try:
                  return unicode(string, encoding)
--- 70,74 ----
  
      def Unicode(string, encoding=config.encoding):
!         if string.__class__ == str:
              try:
                  return unicode(string, encoding)
***************
*** 80,84 ****
  
      def String(string, encoding=config.encoding):
!         if type(string) == unicode:
              return string.encode(encoding, 'replace')
          return string
--- 83,87 ----
  
      def String(string, encoding=config.encoding):
!         if string.__class__ == unicode:
              return string.encode(encoding, 'replace')
          return string

Index: mediainfo.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/util/mediainfo.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** mediainfo.py        23 Feb 2004 19:27:07 -0000      1.31
--- mediainfo.py        27 Feb 2004 20:15:03 -0000      1.32
***************
*** 11,14 ****
--- 11,17 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.32  2004/02/27 20:15:03  dischi
+ # more unicode fixes
+ #
  # Revision 1.31  2004/02/23 19:27:07  dischi
  # fix mmpython init
***************
*** 289,293 ****
              if not k in self.uncachable_keys and getattr(object,k) != None:
                  value = getattr(object,k)
!                 if isinstance(value, str) or isinstance(value, unicode):
                      value = Unicode(value.replace('\0', '').lstrip().rstrip())
                  if value:
--- 292,296 ----
              if not k in self.uncachable_keys and getattr(object,k) != None:
                  value = getattr(object,k)
!                 if isstring(value):
                      value = Unicode(value.replace('\0', '').lstrip().rstrip())
                  if value:



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to