Alex Rivera | Logout

How do I convert a file's format from Unicode to ASCII using Python?

Asked 2008-10-06T17:11:30.427
24

I use a 3rd party tool that outputs a file in Unicode format. However, I prefer it to be in ASCII. The tool does not have settings to change the file format.

What is the best way to convert the entire file format using Python?

Edit
Report

1 Answer

4

By the way, these is a linux command iconv to do this kind of job.

iconv -f utf8 -t ascii <input.txt >output.txt
answered 2011-12-17T09:29:58.033

Your Answer