summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Graham <joseph@fibreglass.tunachunks>2013-09-07 19:43:48 +0100
committerJoseph Graham <joseph@fibreglass.tunachunks>2013-09-07 19:43:48 +0100
commitd451906a78ac2f6379f8284d27b4996b433614da (patch)
tree1060eb3dff0d069583443a06930f47a9125d1847
parentdffe5965d45b422f37a4b2ed4e3304a8f93476d3 (diff)
modification
-rw-r--r--common_codez9
1 files changed, 7 insertions, 2 deletions
diff --git a/common_codez b/common_codez
index 33a2f01..b4450ac 100644
--- a/common_codez
+++ b/common_codez
@@ -4,6 +4,11 @@ function replace_wierd_html_chars
{
#w3m -dump -T text/html -cols 9999
- # Let's see if this new code works better
- recode html..utf-8
+ # Let's see if this new code works better. Try CP1252 encoding and if it's not possible
+ # utf-8
+ while read input
+ do
+ recode html..CP1252 2>/dev/null <<< "${input}" ||
+ recode html..utf-8 2>/dev/null <<< "${input}"
+ done
}