Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/07/2011, 22:04
Avatar de razpeitia
razpeitia
Moderador
 
Fecha de Ingreso: marzo-2005
Ubicación: Monterrey, México
Mensajes: 7.321
Antigüedad: 19 años, 2 meses
Puntos: 1360
Respuesta: Como convertir texto a UTF8-LE

Código Python:
Ver original
  1. #coding: utf-8
  2.  
  3. path = r"/home/usuario/archivo-utf8.txt"
  4.  
  5. f = open(path, "rb")
  6. data = f.read()
  7. f.close()
  8.  
  9. print unicode(data, "utf-8")
Esto debería funcionar si tu shell soporta utf-8