Does anyone know of any eclipe plugin that lets you easily change and use file encodings? I sometimes need to edit template files to do small tweaks, but the files are sometimes ISO, sometimes UTF8, sometimes others, so using eclipse for this leads to disaster :)
properties files are Latin1 (ISO-8859-1) encoded by definition. ISO-8859-1 as its default encoding. You can change this under: Preferences > General > Content Types.
Use the ICU component to detect the possible encodings of the current editing text file, and alert you to change encoding if the encoding may not be set correctly. Allow you to change encoding through the popup menu.
Try this for converting one file:
ctrl+c
or cmd+c
on Mac) ctrl-a
(or cmd-a
on Mac) to select the whole text and replace it with the content of your clipboard (ctrl-v
or cmd-v
)Source: http://artur.ejsmont.org/blog/Convertig-file-encoding-to-UTF-8-from-other-Unicode-and-removing-Byte-Order-Marks
Worked on my Mac!
Changing the encoding in the Properties does the exact opposite of transcoding the file: it reinterprets the file's contents as if it were encoded in the specified encoding. This is useful too, but is not the functionality Prody wants.
There is apparently no way to actually transcode a file within Eclipse.
This should be in the Properties of each file.
Under the "Info" header, there is a "Text File encoding" group. You can change the selection to "Other", and choose the desired encoding from there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With