views:

33

answers:

2

I am getting a file with a faroese name and trying to save it in a PHP script:

2010_08_Útflutningur.xls

In Ubuntu 10.04 LTS is saving it as :

2010_08_�tflutningur.xls (invalid encoding)

I've installed and run utf8-migration-tool, but with no effect.

Is this a ubuntu error that I can fix or I just have to give up and modify the name in php?

Thanks

+1  A: 

"Ú" it's not the ubuntu error.Basically your "Ú" chartered takes as a unreadable special charecter.So it's better to modify the name.

riad
PHP is reading it correctly and with proper encoding. why not saving it as it came? it was generated as a valid name for the original OS.
Elzo Valugi
A: 

Ubuntu uses UTF8 internally for its filenames. In this particular case utf8_encode does the trick as the original filename is ISO-8859-1 encoded. In other cases I could use iconv, and detect the encoding if is unknown.

Elzo Valugi