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 );