Szopinski
Szopinski

Reputation: 820

NetBeans charset problem. Linux -> Windows

I have problem with charset in my NetBeans on Windows when I open files, which were editting in NB on Linux by my coworkers.

I guess it should be unicode in both. What I should to do to resolve this problem? I can find proper option.

Upvotes: 1

Views: 1437

Answers (4)

Hicham Wahbi
Hicham Wahbi

Reputation: 21

I use frensh and changed the netbeans encoding to Iso-8859-1 and it worked for me. tried UTF-8 before didn't do it my symptoms were as follows: - a website hosted on linux and developped by another dev - downloaded on my windows 8 , netbeans 8.0 beta or 8.1 - when opening a file for the first type it was saying "cannot option safely..." if chose Yes all my frensh special chars were messed up -Hicham

Upvotes: 2

Daniel De León
Daniel De León

Reputation: 13679

The most easy way to solve this is by a terminal command

$  sudo sh  netbeans-8.0.2-linux.sh 

Upvotes: 0

Philip
Philip

Reputation: 3500

We had the same problem with Eclipse because of mixed Windows and Linux developers. If you use Java you have 3 options:

  • change to Unicode charset. Though we couldn't do that with Eclipse on Windows, maybe it works out for you. Linux should be usually on Unicode already.
  • change to Iso-8859-1 on Linux, seems to be compatible with CP1252
  • use the tool native2ascii to change non-ASCII-characters in strings to their explicit unicode representation (IMO this is the most robust solution, though it's Java only I guess)

Upvotes: 0

Zverik
Zverik

Reputation: 1

right-click on Project -> Properties -> Sources -> Encoding for maven project, put project.build.sourceEncoding in pom->project->properties

Upvotes: 0

Related Questions