Skip to content Skip to sidebar Skip to footer

Python Popen Special Characters Not Parsing File

I am having issues with non ASCII characters. I am using python 2.7.3 python -V Python 2.7.3 I installed http://pymediainfo.readthedocs.org/en/latest/ via easy_install pymediainf

Solution 1:

The command looks ok. The filename is passed as a bytestring that contains text encoded using utf-8. If your filesystem uses utf-8 then it is correct filename:

>>>print"/mnt/path/Long 73\xc2\xb0 58' W.avi".decode('utf-8')
/mnt/path/Long 73° 58' W.avi

It might be a bug in pymediainfo. Try passing the environment argument explicitely as a workaround e.g., environment=os.environ.

Post a Comment for "Python Popen Special Characters Not Parsing File"