As title says, I'm using Netbeans 8.0.2, on Windows 7 OS. I saw many different topics about this and tried different solutions, but none really helped.
So characters like [š, ć, đ, ž, È, æ] are displayed as � or squared, depending on the font. Here is what I've tried:
-J-Dfile.encoding=UTF-8
in ../etc/netbeans.conf
When I'm reading file, I'm using following code:
BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
or with Charset.forName("UTF-8")
or StandardCharsets.UTF_8
or Charset.forName("ISO8859-2")
nothing helped.
Any one has idea what other problem could be ?
I have found out that this characters [š, ć, đ, ž, È, æ]
are type Eastern European (Windows-1250).
So the correct encoding type is "Windows-1250"
.
That's not a Netbeans issue per se, The netbeans FileAPI
can open files in any encoding. When you don't know what encoding to use you can use this plugin to change the encoding dinamically.
Update: you can find the plugin now in the official plugins page as Encodding Support
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With