1.1 --- a/java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/ext/Texy.java Wed Jun 09 15:54:11 2010 +0200
1.2 +++ b/java/nekurak.net-ejb/src/java/cz/frantovo/nekurak/ext/Texy.java Wed Jun 09 18:34:13 2010 +0200
1.3 @@ -20,6 +20,7 @@
1.4
1.5 /** TODO: parametrizovatelnost */
1.6 private static final String URL_SLUZBY = "http://nekurak.net/texy/http/";
1.7 + private static final String KODOVANI = "UTF-8";
1.8 private static final Logger log = Logger.getLogger(Texy.class.getSimpleName());
1.9
1.10 public String preved(String text) throws TexyVyjimka {
1.11 @@ -32,11 +33,11 @@
1.12
1.13 /** Odešleme data */
1.14 wr = new OutputStreamWriter(spojeni.getOutputStream());
1.15 - wr.write(URLEncoder.encode(text, "UTF-8"));
1.16 + wr.write(URLEncoder.encode(text, KODOVANI));
1.17 wr.flush();
1.18
1.19 /** Přijmeme odpověď */
1.20 - rd = new BufferedReader(new InputStreamReader(spojeni.getInputStream()));
1.21 + rd = new BufferedReader(new InputStreamReader(spojeni.getInputStream(), KODOVANI));
1.22 StringBuffer vysledek = new StringBuffer();
1.23 String radka;
1.24 while ((radka = rd.readLine()) != null) {