Discussion:
How can I change encoding with NetBeans IDE 7.0? :)
ne7work
2011-05-28 17:22:20 UTC
Permalink
Hello all,
I can't find more than 30 minutes from where can I change encoding of file to UTF-8? :)
Best, Alexander.
ebaumann
2011-05-29 19:17:58 UTC
Permalink
Whithout context (Java/C++/PHP, one file, all files): You can set the encoding of the project souce files through the project's properties dialog: Left click on the project whithin the projects view, select properties, category "Sources".
Stadelmann Josef
2011-05-31 09:26:05 UTC
Permalink
You should really look in Help first!

In NetBeans
HELP
Search for UTF-8 and read
About Project Encodings


++++++++++++++++++++++++
About Project Encodings
See Also
By default, newly-created projects in the IDE use UTF-8 character encoding. This encoding determines how the IDE interprets characters beyond the ASCII character set. The IDE displays and saves any new files you create using the encoding set by the project in which they reside. If you want to change encoding properties, the IDE provides you with the ability to do so manually.
Setting Character Encoding
To change the character encoding for a project:
Right-click the project node in the Projects window and choose Properties.
In the left column under Categories, select Sources.

In the Encoding drop-down list, select the character encoding that you want to be applied to the project. Click OK. The new encoding is applied to the project you are working in.

Notes:
When you change the encoding for a project, all new files are created using the new project encoding.

The new value that you set for project encoding is retained as the global project encoding value for new projects. Therefore, when you create a new project, the IDE uses the encoding value of the previously created project for the new project.

Encoding Detection in the IDE
The IDE implements the FileEncodingQuery (FEQ) layer model. FEQ is an interface for obtaining information about which encoding can be used for reading from/writing to a particular file. The layer model prioritizes encoding based on the following hierarchy:
File FEQ. The encoding value declared within a file.
Project FEQ. The value of the current global project encoding in a session.
Fallback FEQ. The encoding of the locale in which the IDE is running.
Opening Older Projects
Previous versions of the IDE (including 5.x) did not implement the FEQ. Consequently, any project created from older versions will be opened using the fallback FEQ, i.e. the default locale set by your system's environment.

If you change the project encoding property on a project that already contains files that were created using a specific character encoding, there is a risk that compiling and running the project may not succeed. This is due to the fact that the programming compiler needs to be passed an encoding value, and there can only be one such value. Neither the IDE nor the programming language performs automatic encoding detection of files.
__________________________________




-----Ursprüngliche Nachricht-----
Von: ne7work [mailto:***@ne7work.com]
Gesendet: Samstag, 28. Mai 2011 19:22
An: ***@netbeans.org
Betreff: [nbusers] How can I change encoding with NetBeans IDE 7.0? :)

Hello all,
I can't find more than 30 minutes from where can I change encoding of file to UTF-8? :)
Best, Alexander.

Loading...