diff options
author | Joseph Graham <joseph@fibreglass.tunachunks> | 2013-09-07 19:43:48 +0100 |
---|---|---|
committer | Joseph Graham <joseph@fibreglass.tunachunks> | 2013-09-07 19:43:48 +0100 |
commit | d451906a78ac2f6379f8284d27b4996b433614da (patch) | |
tree | 1060eb3dff0d069583443a06930f47a9125d1847 | |
parent | dffe5965d45b422f37a4b2ed4e3304a8f93476d3 (diff) |
modification
-rw-r--r-- | common_codez | 9 |
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 } |