Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

problem with create jar file in utf 8 mode

  Asked By: Ira    Date: Oct 11    Category: Java    Views: 2139
  

My program has UI that set data from dataBase,i use utf 8 encoding for
persian text in it,when i create jar file for it(in myEclipse,netbeans or
intellij IDEA 'test with all of them')get me invalid text.but when i run the
main project it run correctly.I occure problem with use utf 8 in jar file.
what should i do?

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Lughaidh Fischer     Answered On: Oct 11

You need to set  utf-8 encoding  for your project  in your IDE settings, and also, you must use persian Locale in your application, as you see below :
Locale locale = new Locale( "fa" , "IR" );
Locale.setDefault( locale );

 
Answer #2    Answered By: Aalia Arain     Answered On: Oct 11

i found it I did both thing yo said but when i run jar  file i had
problem,i use this for solved it:
java -Dfile.encoding=UTF-8 -cp

 
Answer #3    Answered By: Terence Mitchell     Answered On: Oct 11

be sure that your IDE settings is incorrect, I think you need to check your settings again.
in the Intellij Idea for example, you must go to file  --> Settings --> File Encodings , and set
IDE Encoding to UTF-8 . then you should rebuild your project  and create  the jar  file after project rebuild .

 
Answer #4    Answered By: Adalwin Fischer     Answered On: Oct 11

I did all of these solution you tell me befor wrote this message,but i had
problem after run jar  file again.anyway thanks for your message.

 
Didn't find what you were looking for? Find more on problem with create jar file in utf 8 mode Or get search suggestion and latest updates.




Tagged: