1

My program displays french accented characters such as î and é,

perfectly in netbeans.

But when I built it into a jar file,

it displays accents like this.

I am using the same .txt file which the file.io/ file handler is reading the data from. Any ideas on how to fix it so the characters display normally? Thanks a bunch.

EDIT Just tried my program out my mac... The accents showed up like normal, so possibly it's a fujitsu problem?

Community
  • 1
  • 1
  • Maybe Netbeans is forcing local to utf-8 when it runs your program. And when your run your program outside of the IDE, you local is set to the operating system one. Thats why I always append "-Dfile.encoding=UTF-8" to my program command line – iXô Feb 24 '17 at 15:44
  • learn about UTF-8 here http://stackoverflow.com/questions/5366048/swing-not-displaying-unicode-characters – Youcef LAIDANI Feb 24 '17 at 15:45
  • your application is desktop application or web application ? – Youcef LAIDANI Feb 24 '17 at 15:46
  • @YCF_L My application is a java desktop application, created in netbeans. – Danielle Mallon Feb 24 '17 at 16:19
  • ok did you find any information here http://stackoverflow.com/questions/5366048/swing-not-displaying-unicode-characters – Youcef LAIDANI Feb 24 '17 at 16:20
  • @YCF_L I sort of get the gist of it, which is that it's an encoding error which occurs during the compiling stage... But I'm a beginner noob so I'm finding it hard to understand how to solve the problem. – Danielle Mallon Feb 24 '17 at 16:26

1 Answers1

0

You have to insert the charset in your html.

<meta charset="utf-8"> 

More information about this can be found here.

Community
  • 1
  • 1
D. J.
  • 684
  • 6
  • 25