Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import org.jsoup.nodes.Element
import org.jsoup.select.Elements
import java.io.ByteArrayInputStream
import javax.xml.parsers.DocumentBuilderFactory
import java.nio.charset.StandardCharsets

interface RequestResponse

Expand All @@ -53,7 +54,7 @@ class KrawlDocument(val url: KrawlUrl, response: HttpResponse, context: HttpClie
/**
* Raw HTML
*/
val rawHtml: String = try { EntityUtils.toString(response.entity) ?: "" } catch (e: Throwable) { "" }
val rawHtml: String = try { EntityUtils.toString(response.entity, StandardCharsets.UTF_8) ?: "" } catch (e: Throwable) { "" }

/**
* Status code
Expand Down