gremo
gremo

Reputation: 48909

Character encoding of PHP files, only Notepad++ works?

I'm uploading changes to a remote server. PHP web pages are configured with the following meta:

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">

... and I cannot change it to UTF-8 (it would solve my problems).

With Notepadd++

When I edit my file with i.e. notepad++ all works fine.I can correctly see accented characters like "é à ò". I correctly upload changes to the server.

With my IDE (the problem)

When I use my favourite IDE (PHPStorm) accented characters are displayed as � (in the IDE itself). If I made some changes and upload the file to the server, accented characters are replaced with �.

I've to admin I'm not really an expert in file encodings. I just need a way to understand why Notepad++ is working while PHPStorm isn't.

Upvotes: 0

Views: 3436

Answers (1)

BT643
BT643

Reputation: 3845

Does it help if you change the file encoding to ISO-8859-1 in PHPStorm settings?

Project Settings > File Encodings (http://www.jetbrains.com/phpstorm/webhelp/configuring-individual-file-encoding.html)

As you've already said, the correct thing to do is to get everything to be UTF-8, but as you can't do that, changing your PHPStorm IDE to default to ISO-8859-1 might get around the issue for now.

Upvotes: 1

Related Questions