--- Dirk Meyer <[EMAIL PROTECTED]> escreveu: > "Jan Grewe" wrote:
> > I have this message in my log when i start freevo:
> >
> > WARNING:Could not determine system encoding! Did look in
> FREEVO_LOCALE, LANG
> > and LC_ALL environment variables for 'l
> > anguage.encoding' pair, but nothing found! Using ascii
> 
> maybe we should use latin-1 as default?

YES


> Gustavo> we should make sure that EVERY string in Freevo works. We
> Gustavo> should wrap the encoding stuff. Better remove some chars you
> Gustavo> can't encode than crashing.

If we use latin-1 as default encoding, it will remains the old
behaviour. But yes, we can use the 3rd parameter (errors):

s = unicode( s, config.encoding, "replace" )

and:

s = s.encode( config.encoding, "replace" )

I'll commit those changes if you agree.


> >   File "/usr/lib/python2.3/site-packages/freevo/util/fileops.py",
> line 192,
> > in totalspace
> >     s = os.statvfs(path)
> > UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in
> position
> > 24: ordinal not in range(128)
> 
> This is what I was afraid of: path is unicode, python uses 'ascii' to
> convert and boom!

This only happens when you use the "ascii" stuff. In fileops i have the
code to convert it to string using .encode(), but he was using "ascii"
so it crashed and remained as unicode, then python did itself the
conversion and bbbbbbommmmmmmm.


Gustavo

______________________________________________________________________

Yahoo! GeoCities: 15MB de espaço grátis para criar seu web site!
http://br.geocities.yahoo.com/


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to