thouis / numpy-trac-migration

numpy Trac to github issues migration
2 stars 3 forks source link

Support UTF-8 in f2py (Trac #2182) #5972

Open numpy-gitbot opened 12 years ago

numpy-gitbot commented 12 years ago

Original ticket http://projects.scipy.org/numpy/ticket/2182 on 2012-07-09 by trac user opoplawski, assigned to atmention:pearu.

f2py cannot handle UTF-8 input files. See attached for example.

numpy-gitbot commented 12 years ago

Attachment added by trac user opoplawski on 2012-07-09: fortUtil2.f90

numpy-gitbot commented 12 years ago

trac user pepijndevos wrote on 2012-07-10

How would you want to see this implemented? It does not seem possible to autodetect the encoding of input files.

A workaround might be to use iconv to convert your fortran code to ascii.

numpy-gitbot commented 12 years ago

trac user opoplawski wrote on 2012-07-10

It certainly seems possible to detect it. "file" does it and there appears to be a 3-byte header in the file.

Output of file:

fortUtil2.f90: UTF-8 Unicode (with BOM) text