Changeset 33793 for main/trunk
- Timestamp:
- 2019-12-11T18:28:29+13:00 (4 years ago)
- Location:
- main/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/setup.bat
r32986 r33793 6 6 CD /D "%~dp0" 7 7 set GSDLLANG=en 8 9 :: This script's contents were created in Windows codepage 850 (Western European). 10 :: When this script is run in non-English locales like the Chinese locale, the 11 :: character content/encoding of this script can get wrongly interpreted by the 12 :: different encoding of the locale. And then the GS environment gets set wrongly 13 :: or incompletely in those cases. 14 :: So we force this script to be run and interpreted in codepage 850. 15 :: However, the Russian display strings in this script were desgined to work in the 16 :: default Russian Windows codepage 866. Whereas, codepage 850 works for this 17 :: script's remaining English, French, Spanish display strings. So: 18 if ("!GSDLLANG!" == "ru") ( 19 chcp 866 20 ) else ( 21 chcp 850 22 ) 8 23 9 24 echo. … … 282 297 :: https://www.gnu.org/software/wget/manual/html_node/Wgetrc-Location.html 283 298 set WGETRC=%GSDLHOME%/bin/%GSDLOS%/wgetrc 299 300 301 :: On other localse, like Chinese locales, for XMLParsers to read (XML) files 302 :: in UTF-8 encoding (instead of defaulting to encoding GBK when on Chinese locale), 303 :: need to pass -Dfile.encoding=UTF-8 to the JVM. Can have this passed to the JVM by 304 :: setting the JAVA_TOOL_OPTIONS environment variable to this here. 305 :: For example, the example at https://www.mkyong.com/java/how-to-read-utf-8-xml-file-in-java-sax-parser/ 306 :: doesn't work in a Chinese locale until the program is run with 307 :: java -Dfile.encoding=UTF-8 <ReadXMLUTF8FileSAX> 308 :: 309 ::set JAVA_TOOL_OPTIONS=%JAVA_TOOL_OPTIONS% -Dfile.encoding=UTF-8 310 rem set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 -
main/trunk/greenstone3/build.xml
r33462 r33793 2479 2479 </exec> 2480 2480 <exec executable="${catalina.home}/bin/startup.bat" osfamily="windows" dir="${catalina.home}/bin" spawn="true"> 2481 <!--<env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF-8"/>--> 2481 2482 <env key="GSDLOS" value="windows"/> 2482 2483 <env key="GSDL3HOME" value="${web.home}"/> … … 2531 2532 </exec> 2532 2533 <exec executable="${catalina.home}/bin/shutdown.bat" osfamily="windows" dir="${catalina.home}/bin" spawn="false"> 2534 <!--<env key="JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF-8"/>--> 2533 2535 <env key="FEDORA_HOME" path="${fedora.home}"/> 2534 2536 <env key="CATALINA_HOME" value="${catalina.home}"/> -
main/trunk/greenstone3/gs3-setup.bat
r32987 r33793 351 351 set JAVA_HOME=%JAVA_HOME%& set JRE_HOME=%JRE_HOME%& set ANT_HOME=%ANT_HOME%& set CLASSPATH=%CLASSPATH% 352 352 353 rem For locales that are significantly different from the English locale, for example for 354 rem Chinese locales, UTF-8 XML files parsed by DOM or SAX XML parser in Java code requires 355 rem -Dfile.encoding=UTF-8 to be passed to the JVM. We can ensure this happens by setting 356 rem the JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 in gs2build\setup.bat and exporting it as below. 357 rem In that case, can also set this in force-start-tomcat and force-stop-tomcat in build.xml 358 rem Finally, in DirectoryPlugin.pm, uncomment Alias.pm and rename *forLocaleIssue files 359 rem in cpan\Encode to Alias.pm and the up-to-date Locale.pm. 360 rem endlocal & set RUNJAVA=%RUNJAVA%& set PATH=%PATH%& set GSDLOS=%GSDLOS%& set GSDLHOME=%GSDLHOME%& set GSDL3HOME=%GSDL3HOME%& set GSDL3SRCHOME=%GSDL3SRCHOME%& ^ 361 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% 362 353 363 :end
Note:
See TracChangeset
for help on using the changeset viewer.