2011-05-07 49 views
20

En mi proyecto de Java, necesito usar texto y cadenas en árabe, pero el texto es como "???????", entonces, ¿qué pasa? y cómo resolver este problema?Cómo mostrar UTF8 en Netbeans 7?

gracias

Respuesta

33

Puede configurar sus Netbeans con opción de inicio
lugar dentro netbeans.conf en netbeans_default_options

-J-Dfile.encoding=UTF-8

En el extremo que debe ser similar

netbeans_default_options="..... -J-Dfile.encoding=UTF-8"

Espero que te ayudará a

+0

tengo que añadir persa/árabe comentario/RTL, pero ver cómo mala posición f ix es? funciona correctamente en Eclipse – SjB

+0

Creo que tiene que crear todo el documento (archivo de código fuente) en rtl/Farsi/Arabic, no puede marcar solo un lugar para ser RTL. –

+0

¿Cómo crear un documento completo (archivo de código fuente) en rtl/Farsi/Arabic? – SjB

3

Aquí están las instrucciones para configurar el juego de caracteres predeterminado en Netbeans a UTF-8 (en 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. 
3

Ubuntu van directorio ex.

sudo gedit /usr/local/netbeans-8.0/etc/netbeans.conf

Añadir

netbeans_default_options = "- J-Dfile.encoding = UTF-8"

Guardar Fin