Reputation: 5298
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 :)
Upvotes: 7
Views: 8285
Reputation: 149
I just found a plugin for Eclipse "Autodetect Encoding" - you can detect/convert the encoding in files. It can be found in the Help->Marketplace...
I just started testing, but it works so far.
Hint: sometimes you need to change the detector to ICU4j
And even if the convert does not work in a current document (because of detection) you can do this: CTRL+C on one enconding switch to another and CTRL+V it will paste correct then save.
Upvotes: 1
Reputation: 353
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
)Worked on my Mac!
Upvotes: 16
Reputation: 71
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.
Upvotes: 7
Reputation: 5571
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.
Upvotes: 5