karussell / snacktory

Readability clone in Java
461 stars 159 forks source link

Converter.detectCharset throws for inputs longer than 2048 #56

Open LBoraz opened 7 years ago

LBoraz commented 7 years ago

protected String detectCharset(String key, ByteArrayOutputStream bos, BufferedInputStream in, String enc) throws IOException { byte[] arr = new byte[2048];

how to reproduce: do a fetchAndExtract of this url 'http://www.gazzetta.it/Sport-Invernali/Sci-Alpino/Coppa-Mondo-Sci/26-02-2017/sci-combinata-brignone-ho-sciato-senza-paura-uscire-180995893986.shtml'