How to Set "file.encoding" System Property to default "UTF-8"
807580Nov 18 2009 — edited Feb 17 2010When i execute my code some special character are not being display correct so by programming approach i am trying to set "file.encoding" system property to "UTF-8", using command System.setProperty( "file.encoding", "UTF-8" ); and it is not working.
If i run my jar using command java -Dfile.encoding=UTF-8 -jar myprog.jar . It is working and my special characters are also looking in right way.
Can i set this defalut encoding by programming approach.
Thanks
Ashish Pancholi