UserX
UserX

Reputation: 1327

upload files with strange chars when names have accents

Im was with some problem with strange chars when I do inserts on my database and I solve it searching for solutions in stackoverflow with: PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8".

But, Im also having some problems, when I upload files, for example, If I upload a file with name "1º class", it is saved on my computer with name: "1º class", I also have problems when I use accents on my uploaded files. But I dont understand why this is happening and none solution for this.

Do you know how we can solve this situations?

Upvotes: 0

Views: 76

Answers (2)

Pa Ri
Pa Ri

Reputation: 465

You should set default_charset in your php.ini. It should be set with UTF-8. Check your settings with phpinfo() and search for default_charset.

Upvotes: 0

ratmalwer
ratmalwer

Reputation: 735

Check the content-type of your page:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

make sure the page itself is coded in uft-8 (eg. with Notepad++)

Upvotes: 1

Related Questions