• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant copy task corrupts UTF-8 symbols

 
Jana Pejic
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have .properties files with translations in Arabic, Chinese and other UTF-8 languages. I am using them to replace strings in an html file. However, when I start the copy task, it completely corrupts the symbols and I get something like this: المزادات

Any idea what's causing this and how I can fix it?

I am using Eclipse on Windows 7.

build.xml:
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A standard properties file (non-XML variant) is not expected to use UTF-8 encoding. You should be safe with ISO 8859-1 encoding as long as you use the appropriate Unicode escape sequences to replace the diacritics. See the Properties API documentation and the JLS for more information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic