i know this question was asked many times however i'm stuck with this problem and nothing i've read helped me.i have this code:\[code\]BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));String line;while((line = reader.readLine()) != null)content += line+"\r\n";reader.close();\[/code\]i'm trying to get content of this webpage http://www.garazh.com.ua/tires/catalog/Marangoni/E-COMM/description/ and all nonlatin symbols have been displayed wrong.i tried set encoding like:\[code\]BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream(), "WINDOWS-1251"));\[/code\]and at this point everething was well! but i cant change encoding for each website i try to parse and i need some solution.so guys, i know that there is not that easy to detect encoding as it seems but i'm realy need it. if someone had such problem please explain me how you have solved it!any help appriciated!