-5

I am using java 6 on linux machine in my application in am put "thé" into a text box but in my logs it print "th??", why this diacritic is converted to "th??" ?

the output I have seen on eclipse console, I am using eclipse Version: Kepler

There is simple program:-

String s="thé";
System.out.println(s);

OutPut:- "th??"

  • 4
    That Q is pretty broad, as you don't give information on (a) system locale (b) logger used (c) application environment for the unknown logger (d) version numbers of (a-c). – MWiesner Aug 12 '16 at 12:11

1 Answers1

3

This seem to be an encoding issue, check the encoding of your source file. You should be able to change it with your IDE.

To change encoding on eclipse, Window -> Preferences -> General -> Workspace : Text file encoding (Fetched from this post How to change default text file encoding in Eclipse?)

Community
  • 1
  • 1
Winter
  • 3,894
  • 7
  • 24
  • 56