How to fix strange or incorrect icons in Maintenance

If you see these types of icons as in the picture below, this is not a bug in DHIS2 - it has to do with the Java environment in Windows.

To fix this, follow these steps:

  1. Open a cmd window, and run the following:
    java -XshowSettings:properties -version
  2. Look at the output, if the file.encoding property is Cd1252 (or anything except UTF-8/UTF8), that property must be updated.
  3. Do this by creating a small text file (using e.g Notepad) in the “C:\Program Files\Apache Software Foundation\Tomcat x.x\bin”
    called “setenv.bat”, and add the following line in the file:
    set “JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8”
    OR
    Open up Tomcat9w, go to the Java tab then add one line in the java options panel
    -Dfile.encoding=UTF-8
  4. Restart Tomcat

Thanks to @varl, @Calle_Hedberg, @Shurajit_Dutta for instructions.

2 Likes

Thanks for this Karoline, I have tried both methods and neither work for me, I’m on Windows Server 2012 R2 with java 1.8.
regards
Chris

1 Like

Hi Karoline, I’ve just checked and it’s now working OK, maybe it was cached!
thanks
Chris

1 Like