0

I have added some Hindi characters in Unicode to a Java program. Eclipse has no trouble with it, and can run this code, but Gradle keeps crashing - apparently this is due to javac making assumptions about character sets.

I believe I could handle this by converting my whole source directory to Unicode, and specifying encoding as "unicode" in the build.gradle file.

a) is there an official converter, and b) if so, how can I drive it from the build.gradle file?

The program in question is at https://github.com/jpaulm/drawfbp/blob/master/src/main/java/com/jpaulmorrison/graphics/MyFontChooser.java - line 272. Strangely, Gradle has no trouble with the Chinese characters at line 286, so why does only Hindi have problems? Help would be much appreciated!

Egor Neliuba
  • 14,784
  • 7
  • 59
  • 77
Paul Morrison
  • 1,694
  • 3
  • 20
  • 35
  • It appears that I should be able to use Eclipse compiler, rather than javac. There is a Gradle plugin called "ecj", but I don't see how to bring it in - Gradle build keeps saying "plugin not found"... Help, please! – Paul Morrison Jan 23 '17 at 03:12
  • I had to back out the added Russian and Hindi text, so these lines aren't currently available on the specified web page. However, I think switching build.gradle to use ecj might solve the problem, so this is what I now need to know... TIA – Paul Morrison Jan 23 '17 at 15:02

1 Answers1

0

This is embarrassing! I had one segment in Russian and another in Hindi (Devanagari), the former in ASCII, the latter in Unicode. I assumed my problem was with the Hindi, but it was actually with the Russian! When I converted the Russian to Unicode, everything worked fine (both Eclipse and Gradle)! Abject apologies! I guess we can close this one!

Paul Morrison
  • 1,694
  • 3
  • 20
  • 35