Changeset 34098


Ignore:
Timestamp:
2020-04-04T15:34:45+13:00 (4 years ago)
Author:
ak19
Message:

The inclusion of chcp 850 in setup.bat was not sufficient when Tracie Feng was working on her machine that's set to Chinese locale. The additional changes described at http://trac.greenstone.org/changeset/33793 were found to be necessary also. So am activating these additional changes by uncommenting them. This commit also contains some minor changes to comments.

Location:
main/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/setup.bat

    r33793 r34098  
    299299
    300300
    301 :: On other localse, like Chinese locales, for XMLParsers to read (XML) files
     301:: On other locales, like Chinese locales, for XMLParsers to read (XML) files
    302302:: in UTF-8 encoding (instead of defaulting to encoding GBK when on Chinese locale),
    303303:: need to pass -Dfile.encoding=UTF-8 to the JVM. Can have this passed to the JVM by
     
    305305:: For example, the example at https://www.mkyong.com/java/how-to-read-utf-8-xml-file-in-java-sax-parser/
    306306:: doesn't work in a Chinese locale until the program is run with
    307 :: java -Dfile.encoding=UTF-8 <ReadXMLUTF8FileSAX>
     307:: java -Dfile.encoding=UTF-8 <ReadXMLUTF8FileSAX>, so for GS3 this will be passed in to tomcat
     308:: in build.xml
    308309::
    309310::set JAVA_TOOL_OPTIONS=%JAVA_TOOL_OPTIONS% -Dfile.encoding=UTF-8
    310 rem set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
     311set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
  • main/trunk/greenstone3/build.xml

    r34021 r34098  
    24992499    </exec>
    25002500    <exec executable="${catalina.home}/bin/startup.bat" osfamily="windows" dir="${catalina.home}/bin" spawn="true">
    2501       <!--<env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF-8"/>-->
     2501      <env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF-8"/>
    25022502      <env key="GSDLOS" value="windows"/>
    25032503      <env key="GSDL3HOME" value="${web.home}"/>
     
    25522552    </exec>
    25532553    <exec executable="${catalina.home}/bin/shutdown.bat" osfamily="windows" dir="${catalina.home}/bin" spawn="false">
    2554       <!--<env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF-8"/>-->
     2554      <env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF-8"/>
    25552555      <env key="FEDORA_HOME" path="${fedora.home}"/>
    25562556      <env key="CATALINA_HOME" value="${catalina.home}"/>
  • main/trunk/greenstone3/gs3-setup.bat

    r33932 r34098  
    347347:done
    348348:: End localisation of variables that started with the set local/set enabledelayedexpansion command
    349 :: Restore global variables that would otherwise be lost at script's end due to their having been initialised in a
    350 :: set local/set enabledelayedexpansion section. See http://ss64.com/nt/endlocal.html
     349:: Restore global variables that would otherwise be lost at script's end due to their having been
     350:: initialised in a set local/set enabledelayedexpansion section.
     351:: See http://ss64.com/nt/endlocal.html
     352rem endlocal & set RUNJAVA=%RUNJAVA%& set PATH=%PATH%& set GSDLOS=%GSDLOS%& set GSDLHOME=%GSDLHOME%& set GSDL3HOME=%GSDL3HOME%& set GSDL3SRCHOME=%GSDL3SRCHOME%& ^
     353rem set JAVA_HOME=%JAVA_HOME%& set JRE_HOME=%JRE_HOME%& set ANT_HOME=%ANT_HOME%& set CLASSPATH=%CLASSPATH%
     354
     355:: For locales that are significantly different from the English locale, for example for
     356:: Chinese locales, UTF-8 XML files parsed by DOM or SAX XML parser in Java code requires
     357:: that -Dfile.encoding=UTF-8 be passed to the JVM. We can ensure this happens by setting
     358:: the JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 in gs2build\setup.bat and exporting it as below.
     359:: In that case, need to also set JAVA_TOOL_OPTIONS in force-start-tomcat and
     360:: force-stop-tomcat in build.xml
     361:: Finally, in DirectoryPlugin.pm, uncomment Alias.pm and rename *forLocaleIssue files
     362:: in cpan\Encode to Alias.pm and the up-to-date Locale.pm.
    351363endlocal & set RUNJAVA=%RUNJAVA%& set PATH=%PATH%& set GSDLOS=%GSDLOS%& set GSDLHOME=%GSDLHOME%& set GSDL3HOME=%GSDL3HOME%& set GSDL3SRCHOME=%GSDL3SRCHOME%& ^
    352 set JAVA_HOME=%JAVA_HOME%& set JRE_HOME=%JRE_HOME%& set ANT_HOME=%ANT_HOME%& set CLASSPATH=%CLASSPATH%
    353 
    354 rem For locales that are significantly different from the English locale, for example for
    355 rem Chinese locales, UTF-8 XML files parsed by DOM or SAX XML parser in Java code requires
    356 rem -Dfile.encoding=UTF-8 to be passed to the JVM. We can ensure this happens by setting
    357 rem the JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 in gs2build\setup.bat and exporting it as below.
    358 rem In that case, can also set this in force-start-tomcat and force-stop-tomcat in build.xml
    359 rem Finally, in DirectoryPlugin.pm, uncomment Alias.pm and rename *forLocaleIssue files
    360 rem in cpan\Encode to Alias.pm and the up-to-date Locale.pm.
    361 rem endlocal & set RUNJAVA=%RUNJAVA%& set PATH=%PATH%& set GSDLOS=%GSDLOS%& set GSDLHOME=%GSDLHOME%& set GSDL3HOME=%GSDL3HOME%& set GSDL3SRCHOME=%GSDL3SRCHOME%& ^
    362364set JAVA_HOME=%JAVA_HOME%& set JRE_HOME=%JRE_HOME%& set JAVA_TOOL_OPTIONS=%JAVA_TOOL_OPTIONS%& set ANT_HOME=%ANT_HOME%& set CLASSPATH=%CLASSPATH%
    363365
Note: See TracChangeset for help on using the changeset viewer.