- Timestamp:
- 2010-12-09T22:27:33+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java
r23143 r23433 56 56 import org.greenstone.gatherer.gui.WarningDialog; 57 57 import org.greenstone.gatherer.gui.FedoraLogin; 58 import org.greenstone.gatherer.metadata.FilenameEncoding; 58 59 import org.greenstone.gatherer.remote.RemoteGreenstoneServer; 59 60 import org.greenstone.gatherer.util.JarTools; … … 471 472 } 472 473 474 // Check that the local can support multiple filename encodings 475 //System.err.println("#### Java identifies current Locale as (file.encoding): " 476 // + System.getProperty("file.encoding")); 477 if(System.getProperty("file.encoding").equals("UTF-8")){ 478 // If the locale is UTF-8, Java will interpret all filename bytes as UTF-8, 479 // which is a destructive process as it will convert characters not recognised 480 // by UTF-8 into the invalid character, rather than preserving the bytecodes. 481 // This has the effect that non-UTF8 encoded filenames on a system set to a 482 // UTF-8 locale are not 'seen' by Java (if they contain non-ASCII characters). 483 multipleFilenameEncodingsNotSupported(); 484 FilenameEncoding.MULTIPLE_FILENAME_ENCODINGS_SUPPORTED = false; 485 FilenameEncoding.URL_FILE_SEPARATOR = File.separator; 486 } else { 487 FilenameEncoding.MULTIPLE_FILENAME_ENCODINGS_SUPPORTED = true; 488 FilenameEncoding.URL_FILE_SEPARATOR = "/"; // URL file separator is always "/" 489 } 490 473 491 // Set the default font for all Swing components. 474 492 FontUIResource default_font = Configuration.getFont("general.font", true); … … 852 870 + File.separator + "cgi" + File.separator + "gsdl3site.cfg"; 853 871 } else { // cgi-bin/gsdlsite.cfg 854 return Configuration.gsdl_path + File.separator872 return Configuration.gsdl_path /* + File.separator */ 855 873 + "cgi-bin" + File.separator + "gsdlsite.cfg"; 856 874 } … … 1258 1276 } 1259 1277 1278 /** Prints a warning message about the OS not supporting multiple filename encodings. */ 1279 static private void multipleFilenameEncodingsNotSupported() { 1280 WarningDialog dialog = new WarningDialog("warning.NoEncodingSupport", 1281 Dictionary.get("General.MultipleFileNamesNotSupported.Title"), 1282 Dictionary.get("General.MultipleFileNamesNotSupported.Message"), null, false); 1283 dialog.display(); 1284 dialog.dispose(); 1285 dialog = null; 1286 } 1260 1287 1261 1288 /** Sets up the proxy connection by setting JVM Environment flags and creating a new Authenticator.
Note:
See TracChangeset
for help on using the changeset viewer.