Changeset 34098
- Timestamp:
- 2020-04-04T15:34:45+13:00 (4 years ago)
- Location:
- main/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/setup.bat
r33793 r34098 299 299 300 300 301 :: On other local se, like Chinese locales, for XMLParsers to read (XML) files301 :: On other locales, like Chinese locales, for XMLParsers to read (XML) files 302 302 :: in UTF-8 encoding (instead of defaulting to encoding GBK when on Chinese locale), 303 303 :: need to pass -Dfile.encoding=UTF-8 to the JVM. Can have this passed to the JVM by … … 305 305 :: For example, the example at https://www.mkyong.com/java/how-to-read-utf-8-xml-file-in-java-sax-parser/ 306 306 :: 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 308 309 :: 309 310 ::set JAVA_TOOL_OPTIONS=%JAVA_TOOL_OPTIONS% -Dfile.encoding=UTF-8 310 remset JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8311 set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 -
main/trunk/greenstone3/build.xml
r34021 r34098 2499 2499 </exec> 2500 2500 <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"/> 2502 2502 <env key="GSDLOS" value="windows"/> 2503 2503 <env key="GSDL3HOME" value="${web.home}"/> … … 2552 2552 </exec> 2553 2553 <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"/> 2555 2555 <env key="FEDORA_HOME" path="${fedora.home}"/> 2556 2556 <env key="CATALINA_HOME" value="${catalina.home}"/> -
main/trunk/greenstone3/gs3-setup.bat
r33932 r34098 347 347 :done 348 348 :: 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 352 rem endlocal & set RUNJAVA=%RUNJAVA%& set PATH=%PATH%& set GSDLOS=%GSDLOS%& set GSDLHOME=%GSDLHOME%& set GSDL3HOME=%GSDL3HOME%& set GSDL3SRCHOME=%GSDL3SRCHOME%& ^ 353 rem 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. 351 363 endlocal & 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 for355 rem Chinese locales, UTF-8 XML files parsed by DOM or SAX XML parser in Java code requires356 rem -Dfile.encoding=UTF-8 to be passed to the JVM. We can ensure this happens by setting357 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.xml359 rem Finally, in DirectoryPlugin.pm, uncomment Alias.pm and rename *forLocaleIssue files360 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%& ^362 364 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% 363 365
Note:
See TracChangeset
for help on using the changeset viewer.