1

Comments in java file are written in french. However the code is getting distorted. What setting in eclipse can i use so that code and comment is rendered properly.

// R�cup�ration des params d'envoi mail du fichier BFC2.properties

texte.append("Vous recevez ce mail automatique suite � la cr�ation d�un ou plusieurs nouveaux items dans");
        texte.append("l�application FERIA");
4
  • 3
    try setting, Window > Preferences > General > Content Types, set UTF-8 as the default encoding, also refer this discussion Commented Nov 30, 2015 at 5:31
  • You can use unicode escapes, but it's hard to tell which you need because your text doesn't render here. Commented Nov 30, 2015 at 5:31
  • it does not work with this setting.. i have tried it
    – simba
    Commented Nov 30, 2015 at 5:37
  • 1
    If you did not create these files you need to find out what encoding was used to create them
    – greg-449
    Commented Nov 30, 2015 at 8:28

1 Answer 1

0

I really hope this is a university project. Anyway, I am guessing you're using Windows which means that default character encoding for your source files will be Windows-1252 (since it's French).
What you need is to change file encoding both on project level and individual file level.

First you need to select current project, right-click on it and select Properties from a pop-up menu:

enter image description here

Then you can set global file encoding for the project:

enter image description here

This should set valid encoding for new folders and files. However, it won't change encoding of existing ones. In order to change the encoding for the file, you need to right click on it and select its properties:

enter image description here

Only then you can actually change the encoding for your current file:

enter image description here

Your job is sadly still not over, since now you'd have to fix broken accents by hand. Sorry.
The better option is to actually use ResourceBundles - you can read more about this approach here. This is easily done via Eclipse built-in string externationalization feature (Source -> Externalize Strings...).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.