- Timestamp:
- 05/01/09 09:54:36 (16 months ago)
- Location:
- tools/routingservice/branches/wrs-2.0/src
- Files:
-
- 2 modified
-
WRS.java (modified) (3 diffs)
-
handler/DatabaseHandler.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tools/routingservice/branches/wrs-2.0/src/WRS.java
r314 r315 65 65 import util.Sref; 66 66 67 import org.restlet.data.CharacterSet; 67 68 import org.restlet.data.Form; 68 69 import org.restlet.data.MediaType; … … 154 155 System.exit(0); 155 156 } 157 158 System.out.println(System.getProperty("file.encoding")); 156 159 157 160 log = new Log(this.conf.getLog().getUrl(), this.conf.getLog() … … 245 248 response.setEntity(result, MIMETypes.valueOf( 246 249 templateType.toUpperCase()).getType()); 250 //Magical thing you need to do to set a proper encoding 251 response.getEntity().setCharacterSet(CharacterSet.valueOf("UTF-8")); 247 252 } 248 253 catch (InvalidVersionException e) -
tools/routingservice/branches/wrs-2.0/src/handler/DatabaseHandler.java
r314 r315 20 20 import geometry.Point; 21 21 22 import java.io.UnsupportedEncodingException; 22 23 import java.math.BigDecimal; 23 24 import java.sql.Connection; … … 142 143 op.setType(request.getService().getOut().get(key) 143 144 .getType()); 144 op.setValue(result.getString(key)); 145 //op.setValue(result.getString(key)); 146 op.setValue(new String(result.getBytes(key), "UTF-8")); 145 147 146 148 paraMap.put(key, op); … … 148 150 out.add(paraMap); 149 151 } 152 stmt.close(); 150 153 } 151 154 catch (SQLException e) 155 { 156 // TODO Auto-generated catch block 157 e.printStackTrace(); 158 } 159 catch (UnsupportedEncodingException e) 152 160 { 153 161 // TODO Auto-generated catch block
