How To Display UTF8 In Netbeans 7? - netbeans

In my java project, I need to use Arabic text and strings, but the text becomes like "???????" , so what wrong ? and how to resolve this problem?
thanks

You can setup your Netbeans with startup option
place it inside netbeans.conf into netbeans_default_options
-J-Dfile.encoding=UTF-8
In the end it should look like
netbeans_default_options="..... -J-Dfile.encoding=UTF-8"
Hope it'll help you

Here are instructions for setting the default character set in Netbeans to UTF-8 (in Windows):
1 Go to C:\Program Files\netbeans-x.x\etc
2 Open netbeans.conf in Notepad.
3 On the netbeans_default_options add: -J-Dfile.encoding=UTF-8. (make sure to put it within the quotation marks)
4 Project properties -> Build -> Compiling ->
Additional compiler options) text box.- add: -encoding UTF-8
5 You can also check to make sure that you have increased the memory allocation for Netbeans by looking at the netbeans_default_options line. The default max is 128MB. We have increased this to 256MB.

Ubuntu go directory
ex.
sudo gedit /usr/local/netbeans-8.0/etc/netbeans.conf
Add
netbeans_default_options="-J-Dfile.encoding=UTF-8"
Save Fin

Please follow the bellow issue to solve the how to UTF 8 Dari, Pashto, Persian and Arabic Support in Netbeans
open the C:\Program Files\NetBeans 8.0.2\etc PAT form windows
than copy the netbeans.conf into your some place in your computer
add the -J-Dfile.encoding=UTF-8 inside netbeans_default_options=
like bellow code
netbeans_default_options="-J-Dfile.encoding=UTF-8 -J-client -J-Xss2m -J-Xms32m -J- XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true"
than replace the file into C:\Program Files\NetBeans 8.0.2\etc
now close the netbeans and reopen it, so it work all language like Dari, Pashto, Persian, Arabic and etc...

Related

Use Notepad++ as HEX-Editor

I'm using Notepad++, version 7.8.5 64bit on Windows 10. I'd like to use it as a Hex Editor.
I open a binfile, but Notepad shows it to me as a text with strange characters. In order to visualize the Hex-numbers, I select a part of the text, go and click on the voice
Plugins/Converter/ASCII-->HEX
and it shows me the hex-numbers of the selected part. Now I'd like to see the whole file in hex, but it doesn't work. It seems that selecting some parts it works, other parts it doesn't.
I need to convert or visualize the whole file in HEX.
I have also tried:
Plugins/Plugins Admin…
but the HEX-Editor isn't there.
Thanks 4 help
Edit:
Please note - the installation has been adapted for 64 bit in the meantime.
Please update to e.g. Notepad++ 8.4.7 (64-bit) from the download section
Go to the menu Plugins > Plugins Admin
Enter Hex in the search field.
Select Hex-Editor and press ìnstall.
It seems to me you tried to install a hex editor and ended up in the wrong tool (Plug-In) Converter (ASCII -> HEX) as mentioned in your question above.
The installation process of the HexEditor is somewhat confusing because it is currently available only in the Plugins Admin for the 32-bit version.
A simple solution is to install a Notepad++ x32 version on a USB stick (e.g. using PortableApps).
But, and thanks to Peter Jones, here is a download link to the x64 version. and explanation to actually perform the manual install:
unzip the appropriate downloaded zipfile and open that containing folder (or have the zipfile open in windows explorer)
In Notepad++, use Plugins > Open Plugins Folder.
In the newly-opened plugins folder, add a subfolder HexEditor.
Copy the HexEditor.dll from the zipfile into the HexEditor subfolder… so it should be at ...\notepad++\plugins\HexEditor\HexEditor.dll
Close all open windows of Notepad++.
Restart Notepad++ again.
HexEditor should be available in the Plugins menu, and HexEditor.dll should be listed in the ? > Debug Info plugins list.
Successfully tested by Notepad++ Version 7.8.5 64bit on Windows 10. For further information see the links above. Please note a UAC problem, i.e. run Notepad++ as Administrator.
Answer from help-info.de is working.
However it is not that great if you are in a context where you need to copy paste the result of the hex output provided by the plugin.
For example let's say the following bytes are displayed by the NPP_HexEdit window:
00 06 12 0b
If you select from left to right, copy then paste (in a new text file), you will get:
20 06 12 0b
For some reason, '0x00' are converted into UTF-8 '20' and since '0x20' are also converted into UTF-8 '20' you can't really use the copy + paste feature here.
If you select from right to left, copy then paste (in a new text file), you will get:
12 01 0e 0d
I will not even try to convert this one, clearly unusable....
Solution (Windows)
From Plugins > Plugins Admin select and install NppExec, restart npp.
Select Plugins > NppExec > Npp Execute... and enter the following:
SET local OUTFILE = "$(FULL_CURRENT_PATH).hex.txt"
cmd /c <XXD_DIRECTORY>\xxd.exe -p $(FULL_CURRENT_PATH) >$(OUTFILE)
NPP_OPEN $(OUTFILE)
From the same window save your script, for example bin_to_hex.
From Plugins > NppExec > Advanced Options select your script from Associated script: and add it with Add/Modify then press Ok and restart npp.
In npp, open your bin file.
Select Plugins > NppExec > bin_to_hex and you are done!, should get your bin as HEX in a new tab.
xxd.exe can be recovered from multiple location such as:
C:\Program Files (x86)\Vim\vim74
(I used this on my side, from Cmder) C:\Cmder\vendor\git-for-windows\usr\bin
Edited
Instead of using xxd.exe, you can use the following powershell approach (better format but longer to execute). Replace the script with:
SET local OUTFILE = "$(FULL_CURRENT_PATH).hex.txt"
cmd /c powershell -command "format-hex $(FULL_CURRENT_PATH) > $(OUTFILE);exit"
NPP_OPEN $(OUTFILE)

NetBeans 11 and Encoding characters

Now I download Apache NetBeans 11 and after that, I CLONE my Git PHP Repository to Windows Folder, If I open HTML files via Notepad, everything is ok, but when I open it via NetBeans, I got wrong characters interpretation like this:
BAD
Ăšvod
RIGHT
Úvod
How can I solve it to use UTF8? When I open a file in example via PSPad Editor I see the encoding is UTF8, but the format is UNIX, not DOS, maybe this cause a problem
Edit:
When I use Netbeans 8.2 Characters are ok
Any sugestions?

PyCharm 55 UTF-8 Encoding

When I'm trying to print Russian text in console I get �����, despite the fact I set File Encoding and IDE Encoding to UTF-8. This problem have appeared only after updating PyCharm to 5.
Here's the pic of Typing Russian text
If in Windows or Linux add the following lines at the end of the file (Windows)PYCHARM_HOME/bin/pycharm.exe.vmoptions, (Linux)PYCHARM_HOME/bin/pycharm.vmoptions:
-Dconsole.encoding=UTF-8
-Dfile.encoding=UTF-8
In OS X Open Info.plist located in /Applications/RubyMine.app/Contents, locate the tag <key>VMOptions</key>, and modify it as follows:
<key>VMOptions</key>
<string>-Xms16m -Xmx512m -XX:MaxPermSize=120m
-Xbootclasspath/p:../lib/boot.jar -ea
-Dconsole.encoding=UTF-8
-Dfile.encoding=UTF-8
</string>
Taken from Configuring Output Encoding and Why unicode string is not shown on PyCharm's console?
Try this: go Settings -> Editor -> File Encodings and set Project Encoding to System Default (It was windows-1251 encoding in my case). It works for me.

Visual Studio 2012 strange characters at beginning of file

Whenever i copy a file made in VS2012 over to Eclipse, and open the file in Eclipse doc viewer there always seem to be some extra characters at the beginning (pic below). They arent visible in VS2012, or if I open the file in Notepad. What character is that being put there, and how can i get it to stop? Below is a pic of a JS file I made i VS, and how it appears in Eclipse
Thats a UTF8 BOM, Ive heard thgis works well for windows
http://www.bryntyounce.com/filebomdetector.htm
If you have access to linux you can use awk to remove

Editing netbeans.config to set jdk path results in an error

Hi I recently upgraded to windows 8.
For some reason after I installed netbeans it did not point to my instalation of jdk.
I had this problem before under windows 7 and I modified the path by editing the netbeans.config file.
I tryed to do the same thing but for some reason when I try to save the file in notepad++ I get an error stating that the file is opened in another program.
I tryed doing the same with wordpad an there I got the error that access is denied.
I restarted my computer two times same problem still persists.
Is there any other way of setting the path for the jdk?Maybe from any of netbeans option?
i was trying to this but that didn't work for me cause i need privileges..
My solution:
Just open notepadd++ as Admin and then you can do whatever you want..
If that doesn't work, delete the file and then create a new one with the same content(don't forget to run notepad++ as admin)
copy the content of netbeans.confg
delete it
create new file with the same name
past and perform your edit
Make shure netbeans isn't open when you edit the config file.
If setting of netbeans_jdkhome in the netbeans.conf doesn't work, you can outcomment it (insert a # before). Now netbeans will use the default JDK installed. However, you a proper path for java is required (and JAVA_HOME).
Its also possible to set the JDK by commandline argument: --jdkhome <dir>
See:
Setting JDK by command line
Netbeans.conf - see JDK part