- Timestamp:
- 2020-03-03T14:42:14+13:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/Dictionary.java
r33769 r33994 62 62 try 63 63 { 64 this.raw = ResourceBundle.getBundle(this.resource, this.locale );64 this.raw = ResourceBundle.getBundle(this.resource, this.locale, new UTF8Control()); 65 65 } 66 66 catch (Exception e) … … 76 76 try 77 77 { 78 this.raw = ResourceBundle.getBundle(this.resource, this.locale );78 this.raw = ResourceBundle.getBundle(this.resource, this.locale, new UTF8Control()); 79 79 } 80 80 catch (Exception e) … … 103 103 try 104 104 { 105 this.raw = ResourceBundle.getBundle(this.resource, this.locale, loader );105 this.raw = ResourceBundle.getBundle(this.resource, this.locale, loader, new UTF8Control()); 106 106 return; 107 107 } … … 114 114 try 115 115 { 116 this.raw = ResourceBundle.getBundle(this.resource, this.locale );116 this.raw = ResourceBundle.getBundle(this.resource, this.locale, new UTF8Control()); 117 117 } 118 118 catch (Exception ex) … … 220 220 try 221 221 { 222 String initial_raw = this.raw.getString(key); 223 // convert to unicode, copied from gatherer dictionary 224 String initial = new String(initial_raw.getBytes("ISO-8859-1"), "UTF-8"); 222 // In older versions of Java, the resource-bundle/properties file was assumed to be "ISO-8859-1", and so 223 // we used to perform a string conversion here so we could support UTF-8 224 // With the introduction of UTF8Control, based on a StackOverflow posting, we now directly work 225 // with the resource as UTF-8, and so not conversion is needed 226 String initial = this.raw.getString(key); 225 227 226 228 // if we haven't been given any args, don't bother looking for them
Note:
See TracChangeset
for help on using the changeset viewer.