Changeset 33793 for main/trunk/greenstone2/setup.bat
- Timestamp:
- 2019-12-11T18:28:29+13:00 (4 years ago)
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.