vi ringrazio, ho trovato.

Il 13/11/07, Lawrence Oluyede <[EMAIL PROTECTED]> ha scritto:
>
> > Mettiamo ad esempio che io debba leggere un file codificato in 'latin-1'
> se
> > non tocco l'encoding alcuni caratteri non saranno riconosciuti perché
> non
> > presenti nel set di default di python. Per cui come faccio ad impostare
> > l'encoding del file. Ad esempio se devo leggere un file di testo posso
> > impostare in qualche modo che il contenuto del file che andrò a leggere
> sarà
> > codificato in un certo modo?
>
> Non devi usare la open builtin ma la open del modulo codecs.
> http://docs.python.org/lib/module-codecs.html
>
> ciao!
>
> --
> Lawrence, oluyede.org - neropercaso.it
> "It is difficult to get a man to understand
> something when his salary depends on not
> understanding it" - Upton Sinclair
>
> _______________________________________________
> Python mailing list
> Python@lists.python.it
> http://lists.python.it/mailman/listinfo/python
>
>
_______________________________________________
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python

Rispondere a