18

I have a file which has international characters (UTF-8). How so I set this encoding type as a part of svn property and how do I ensure that it overrides automatically default encoding in eclipse i.e. eclipse should automatically set UTF-8 encoding based on the svn property (may be mime-type).

Wolf
  • 9,679
  • 7
  • 62
  • 108
harrybvp
  • 2,445
  • 2
  • 22
  • 30
  • Maybe related: [How to support UTF-8 encoding in Eclipse](https://stackoverflow.com/q/9180981/2932052) – Wolf Jan 05 '21 at 12:20

4 Answers4

20

svn propset svn:mime-type "text/plain; charset=UTF-8" filename...

cabo
  • 987
  • 8
  • 9
2

I had same problem, but solved by setting below:

Set Encoding in Eclipse: Project --> Properties --> Resources --> Text File Encoding --> Other (UTF-8)

1

I was struggling with this for a while, and have found another solution. If you're using maven you can set the encoding in the pom. see https://maven.apache.org/general.html.

After you've added this, when you do a Maven > Update Project (Alt + F5) it will set the correct encoding for the project.

<project>
  ...
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  ...
</project>
Keshan Nageswaran
  • 8,060
  • 3
  • 28
  • 45
Chris M
  • 1,058
  • 1
  • 15
  • 26
0

In SVN, I don't know but you can set text file encoding on each file individually: right-click on the file, go to properties and in the resource submenu check 'Other' for Text File Encoding.

CRABOLO
  • 8,605
  • 39
  • 41
  • 68
Nicolas
  • 1,155
  • 6
  • 17
  • My requirement is eclipse should auto pickup contenttype/char encoding of the SVN File,I dont want to set it manually. – harrybvp Aug 09 '11 at 16:15