Strabon

changeset 276:5cc013380ec7

Adding utf-8 support - fixed
author Kostis Kyzirakos <kkyzir@di.uoa.gr>
date Wed Jun 13 18:12:05 2012 +0300 (2012-06-13)
parents 40e87b44f8f7
children cb57136a0299
files endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java
line diff
     1.1 --- a/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java	Wed Jun 13 17:59:06 2012 +0300
     1.2 +++ b/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java	Wed Jun 13 18:12:05 2012 +0300
     1.3 @@ -99,21 +99,14 @@
     1.4  						", errormessage: " + (this.errorMessage != null ? this.errorMessage : " NULL") + ".";
     1.5   			}
     1.6  		}
     1.7 +		
     1.8 +		request.setCharacterEncoding("UTF-8");
     1.9  
    1.10  		DataHive hive = new DataHive(); 
    1.11  
    1.12  		String query = request.getParameter("SPARQLQuery");
    1.13  		String q = (query == null) ? null : URLDecoder.decode(request.getParameter("SPARQLQuery"), "UTF-8");
    1.14 -		
    1.15 -		if (query != null) {
    1.16 -			String q1 = new String(q.getBytes(), "ISO-8859-1");
    1.17 -			String q2 = new String(q.getBytes(), "ISO-8859-7");
    1.18 -			String q3 = new String(q.getBytes(), "ISO-8859-1");
    1.19 -			String q4 = new String(q.getBytes(), "UTF-8");
    1.20  			
    1.21 -			System.out.println("la");
    1.22 -		}
    1.23 -		
    1.24  		hive.setSPARQLQuery(q);
    1.25  
    1.26  		String reqFormat = (request.getParameter("format") == null) ? "" : request.getParameter("format");