First of all, thanks Gustavo and others for enabling
non-Latin1 symbols in the filenames and directories.
That made me almost happy. My Unicode filenames are
displayed properly now. 

My next problem was with MP3 ID tags. That's internal
information from the files, which Freevo extracts and
displays, overriding the filenames whenever possible. 

Unfortunately, MP3 files come with ID tags in a
different codeset (Russans have 5 or 6 of them), than
my default Unicode charset, and I see garbage instead
if Cyrillics in Freevo. 

I thought adding another environment variable for
finer control of the codesets could be a good idea. I
have implemented a hack, which is probably too quick
and dirty to be suggested for adoption, but it
explains what I mean. (Actually, hacking inside
mmpython library seems to be more powerful approach.
It could allow a specific codeset per file type). 

Anyway, here's my changes. It would be nice if
developers could implement something like this or
better in the official Freevo, freeing me from
patching every new version :-)

Sergey 


*** freevo/src/config.py        2004-02-08
15:01:59.000000000 -0500
--- freevo_mp3/src/config.py    2004-02-11
14:25:27.000000000 -0500
***************
*** 866,869 ****
--- 866,875 ----
  if not encoding:
      encoding = LOCALE
   
+ try:
+     mp3encoding = os.environ[ 'MP3_LOCALE' ].split(
'.' )[ 1 ]
+ except:
+     mp3encoding = encoding
+
+
  _debug_( "Using '%s' encoding" % encoding )

*** freevo/src/util/mediainfo.py        2004-02-08
15:02:08.000000000 -0500
--- freevo_mp3/src/util/mediainfo.py    2004-02-11
14:54:10.000000000 -0500
***************
*** 344,350 ****
              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:
                      ret[k] = value
   
--- 344,350 ----
              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(),config.mp3encoding)
                  if value:
                      ret[k] = value
   



__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html


-------------------------------------------------------
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-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to