views:

614

answers:

2

I am switching to Netbeans for php programming (I currently use gedit).

Some characters from the original source code ( à, á, é, è, etc.) are not shown in Netbeans, regardless of the fount used, and a little quotation mark is shown instead. Those files are shown perfectly in both gedit and firefox.

If I modify the file in Netbeans, charaters are shown incorrectly in gedit and firefox. If I add one of the "problematic" characters, these new characters are shown perfectly in netbeans and gedit BUT NOT in firefox (even if html headers are not modified).

I tried adding:

-J-Dfile.encoding=UTF-8 and -J-Dfile.encoding=ISO-8859-1 to netbeans_default_options

on /etc/netbeans.conf with no result.

Any suggestions?

A: 

Use Unicode character escape sequences in the source code. Since they are composed entirely of ASCII characters, they will display uniformly in whatever text editor you use.

ewg
There are hundreds of php files views made by the designers, it would be crazy to edit them all just because my editor doesn't works correctly. Plus the other members of the team could complain.I forgot to mention that Eclipse is working ok too, so the problem is netBeans. I personally prefer Netbeans over Eclipse, so any advise to make it decode my files correctly is appreciated.
Mij
A: 

NetBeans FAQ: How do I set or modify the character encoding for a project?

(Right click project, change the encoding from the properties menu.)

Looks like this needs to be done per-project. (Though XML files can specify their own encoding if they wish.)

mjs