Index: /main/trunk/greenstone2/setup.bash
===================================================================
--- /main/trunk/greenstone2/setup.bash	(revision 34110)
+++ /main/trunk/greenstone2/setup.bash	(revision 34111)
@@ -409,7 +409,7 @@
 export WGETRC=$GSDLHOME/bin/$GSDLOS/wgetrc
 
-if [ "x$JAVA_TOOL_OPTIONS" = "x" ] ; then
-    export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
-else
-    export JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS -Dfile.encoding=UTF-8
-fi
+#if [ "x$JAVA_TOOL_OPTIONS" = "x" ] ; then
+#    export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
+#else
+#    export JAVA_TOOL_OPTIONS=$JAVA_TOOL_OPTIONS -Dfile.encoding=UTF-8
+#fi
Index: /main/trunk/greenstone2/setup.bat
===================================================================
--- /main/trunk/greenstone2/setup.bat	(revision 34110)
+++ /main/trunk/greenstone2/setup.bat	(revision 34111)
@@ -309,7 +309,7 @@
 ::
 :: https://stackoverflow.com/questions/37071353/how-to-check-if-a-variable-exists-in-a-batch-file
-if "x%JAVA_TOOL_OPTIONS%"=="x" ( 
-   set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8  
-) else (
-  set JAVA_TOOL_OPTIONS=%JAVA_TOOL_OPTIONS% -Dfile.encoding=UTF-8
-)
+rem if "x%JAVA_TOOL_OPTIONS%"=="x" ( 
+rem   set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8  
+rem ) else (
+rem   set JAVA_TOOL_OPTIONS=%JAVA_TOOL_OPTIONS% -Dfile.encoding=UTF-8
+rem )
Index: /main/trunk/greenstone3/build.xml
===================================================================
--- /main/trunk/greenstone3/build.xml	(revision 34110)
+++ /main/trunk/greenstone3/build.xml	(revision 34111)
@@ -2487,4 +2487,5 @@
     <exec executable="${sudo.or.not}" os="${os.unix}" dir="${catalina.home}/bin" spawn="false">
       <!--<env key="GSDLOS" value="linux"/> do we need this?? -->
+      <!--<env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF-8"/>--><!-- Was needed by Windows for on e.g. Chinese locales, but added to unix for symmetry-->
       <env key="GSDL3HOME" value="${web.home}"/>
       <env key="PATH" path="${tomcat.path}"/>
@@ -2499,5 +2500,5 @@
     </exec>
     <exec executable="${catalina.home}/bin/startup.bat" osfamily="windows" dir="${catalina.home}/bin" spawn="true">
-      <env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF-8"/>
+      <!--<env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF-8"/>-->
       <env key="GSDLOS" value="windows"/>
       <env key="GSDL3HOME" value="${web.home}"/>
@@ -2546,4 +2547,5 @@
     <!--<exec executable="${catalina.home}/bin/shutdown.sh" os="${os.unix}" dir="${catalina.home}/bin" spawn="false">-->
     <exec executable="${sudo.or.not}" os="${os.unix}" dir="${catalina.home}/bin" spawn="false">
+      <!--<env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF-8"/>--><!-- Was needed by Windows for on e.g. Chinese locales, but added to unix for symmetry-->
       <env key="FEDORA_HOME" path="${fedora.home}"/>
       <env key="CATALINA_HOME" value="${catalina.home}"/>
@@ -2552,5 +2554,5 @@
     </exec>
     <exec executable="${catalina.home}/bin/shutdown.bat" osfamily="windows" dir="${catalina.home}/bin" spawn="false">
-      <env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF-8"/>
+      <!--<env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF-8"/>--><!-- In case on stopping tomcat, GLI may read in some XML file during cleanup for exit? -->
       <env key="FEDORA_HOME" path="${fedora.home}"/>
       <env key="CATALINA_HOME" value="${catalina.home}"/>
Index: /main/trunk/greenstone3/gs3-setup.bat
===================================================================
--- /main/trunk/greenstone3/gs3-setup.bat	(revision 34110)
+++ /main/trunk/greenstone3/gs3-setup.bat	(revision 34111)
@@ -350,6 +350,6 @@
 :: initialised in a set local/set enabledelayedexpansion section.
 :: See http://ss64.com/nt/endlocal.html
-rem endlocal & set RUNJAVA=%RUNJAVA%& set PATH=%PATH%& set GSDLOS=%GSDLOS%& set GSDLHOME=%GSDLHOME%& set GSDL3HOME=%GSDL3HOME%& set GSDL3SRCHOME=%GSDL3SRCHOME%& ^
-rem set JAVA_HOME=%JAVA_HOME%& set JRE_HOME=%JRE_HOME%& set ANT_HOME=%ANT_HOME%& set CLASSPATH=%CLASSPATH%
+endlocal & set RUNJAVA=%RUNJAVA%& set PATH=%PATH%& set GSDLOS=%GSDLOS%& set GSDLHOME=%GSDLHOME%& set GSDL3HOME=%GSDL3HOME%& set GSDL3SRCHOME=%GSDL3SRCHOME%& ^
+set JAVA_HOME=%JAVA_HOME%& set JRE_HOME=%JRE_HOME%& set ANT_HOME=%ANT_HOME%& set CLASSPATH=%CLASSPATH%
 
 :: For locales that are significantly different from the English locale, for example for
@@ -361,6 +361,6 @@
 :: Finally, in DirectoryPlugin.pm, uncomment Alias.pm and rename *forLocaleIssue files
 :: in cpan\Encode to Alias.pm and the up-to-date Locale.pm.
-endlocal & set RUNJAVA=%RUNJAVA%& set PATH=%PATH%& set GSDLOS=%GSDLOS%& set GSDLHOME=%GSDLHOME%& set GSDL3HOME=%GSDL3HOME%& set GSDL3SRCHOME=%GSDL3SRCHOME%& ^
-set JAVA_HOME=%JAVA_HOME%& set JRE_HOME=%JRE_HOME%& set JAVA_TOOL_OPTIONS=%JAVA_TOOL_OPTIONS%& set ANT_HOME=%ANT_HOME%& set CLASSPATH=%CLASSPATH%
+rem endlocal & set RUNJAVA=%RUNJAVA%& set PATH=%PATH%& set GSDLOS=%GSDLOS%& set GSDLHOME=%GSDLHOME%& set GSDL3HOME=%GSDL3HOME%& set GSDL3SRCHOME=%GSDL3SRCHOME%& ^
+rem set JAVA_HOME=%JAVA_HOME%& set JRE_HOME=%JRE_HOME%& set JAVA_TOOL_OPTIONS=%JAVA_TOOL_OPTIONS%& set ANT_HOME=%ANT_HOME%& set CLASSPATH=%CLASSPATH%
 
 :end
