diff options
author | Andrew Dolgov <[email protected]> | 2011-11-27 10:40:59 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-11-27 10:40:59 +0300 |
commit | a523002b83e5f75fbe64125b439afbfa90851f1a (patch) | |
tree | 1c8f6fc5ccf691d09ca4b52088d663ce6a356234 /src | |
parent | 09f01cbf1e11bca553f760a5ce0cd4e87d9861af (diff) |
switch to yet another hack to display utf-8 characters in webview,
thanks google!
Diffstat (limited to 'src')
-rw-r--r-- | src/org/fox/ttrss/ArticleFragment.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/org/fox/ttrss/ArticleFragment.java b/src/org/fox/ttrss/ArticleFragment.java index e2e61944..60ac6090 100644 --- a/src/org/fox/ttrss/ArticleFragment.java +++ b/src/org/fox/ttrss/ArticleFragment.java @@ -56,22 +56,24 @@ public class ArticleFragment extends Fragment { cssOverride = "body { background : black; color : #f0f0f0}\n";
}
- content = URLEncoder.encode("<html>" +
+ content =
+ "<html>" +
"<head>" +
- "<meta content=\"text/html; charset=utf-8\" http-equiv=\"content-type\">" + // wtf, google?
+ "<meta content=\"text/html; charset=utf-8\" http-equiv=\"content-type\">" +
"<style type=\"text/css\">" +
cssOverride +
"img { max-width : 90%; }" +
"body { text-align : justify; }" +
"</style>" +
"</head>" +
- "<body>" + m_article.content + "</body></html>", "utf-8").replace('+', ' ');
- } catch (UnsupportedEncodingException e) {
+ "<body>" + m_article.content + "</body></html>";
+
+ } catch (Exception e) {
content = getString(R.string.could_not_decode_content);
e.printStackTrace();
}
- web.loadData(content, "text/html", "utf-8");
+ web.loadDataWithBaseURL(null, content, "text/html", "utf-8", null);
}
TextView dv = (TextView)view.findViewById(R.id.date);
|