Hello,
I my database (MySQL) I have names of the european cities ex. Wrocław. Whan I read it with code :
I get crappy characters : Wrocław.Code:public List<CityDO> getCityList(Integer countryId) throws Exception { StringBuffer sb=new StringBuffer(); sb.append("SELECT "); sb.append("idcity, "); sb.append("name "); sb.append("FROM "); sb.append("city "); sb.append("WHERE "); sb.append("idcountry =").append(countryId); System.out.println("Query :"+sb.toString()); DBInterface db=DBInterface.getInstance(); DataSource ds=db.getJdbcTemplate().getDataSource(); System.out.println("DB:"+ds+" "+ds.getConnection()); CityQuery pq = new CityQuery(ds,sb.toString()); List<CityDO> result=pq.execute(); return result; }
I have transformed my DB table to support UTF-8, but I don't know why it doesn't work.
Any ideas ?


Reply With Quote