开发者

NetBeans charset problem. Linux -> Windows

开发者 https://www.devze.com 2023-01-06 15:25 出处:网络
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 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开发者_如何学JAVA proper option.


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


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


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)


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

$  sudo sh  netbeans-8.0.2-linux.sh 
0

精彩评论

暂无评论...
验证码 换一张
取 消