- Timestamp:
- 2010-01-04T17:40:03+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/common-src/src/jdbmedit/JdbGet.java
r21402 r21403 30 30 31 31 import java.io.IOException; 32 import java.io.UnsupportedEncodingException; 33 import java.io.OutputStreamWriter; 34 import java.io.PrintWriter; 32 35 import java.util.Properties; 33 36 … … 35 38 public class JdbGet 36 39 { 40 static private PrintWriter utf8out = null; 41 42 static 43 { 44 try { 45 OutputStreamWriter osw = new OutputStreamWriter(System.out, "UTF-8"); 46 utf8out = new PrintWriter(osw, true); 47 } 48 catch (UnsupportedEncodingException e) { 49 System.out.println(e); 50 } 51 } 37 52 38 53 public static void print_usage() … … 56 71 JdbmAPI jdbm_api = new JdbmAPI(dbname,true); 57 72 String val = jdbm_api.get(key); 58 System.out.println(val);73 utf8out.println(val); 59 74 60 75 jdbm_api.close();
Note:
See TracChangeset
for help on using the changeset viewer.