Project Encoding in PhpStorm
Hello,
I have an old project from 2009. The doctype of the HTML header is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Now I want to continue editing the project. How could I set these three things:
IDE, FILE and DEFAULT encoding of the project properly?
If I leave it as it is (all UTF8), I'll get a wrong view of the special German äüöß chars.
请先登录再写评论。
Hi Huy-Vu,
Actually, PhpStorm should automatically switch encoding to a proper one once it meets <meta charset=XX>
What if you switch to ISO-8859-1 manually from the encoding menu, do the chars look OK then?
Thanks for the reply. I already set & restarted with these settings:
IDE: uft8
Project: ISO-8859-1
Default for properties files: System default
and:
IDE: uft8
Project: windows-1252
Default for properties files: System default (windows-1252)
The strange thing is: on localhost (Xampp) the special chars
are displayed wrongly in browser, but on the shared hoster (linux) they are proper.
On the other side the same setting:
IDE: uft8
Project: windows-1252
Default for properties files: System default (windows-1252)
on another laptop with Xampp the special chars were displayed correct in browser.
What is going up?
P.S.: * If I load the files into Notepad++ I see that the original files have encoding "ANSI".