Opened 5 years ago

Closed 5 years ago

#17 closed defect (fixed)

hGetContents: invalid argument (invalid byte sequence) (adblock2privoxy version 1.3.1)

Reported by: jbfuzier@… Owned by: zubr
Priority: major Component:
Version: 1.3 Keywords:
Cc: Project: adblock2privoxy


root@proxy:~/adblock_lists# /root/.cabal/bin/adblock2privoxy -p /tmp/ easylist.txt
process easylist.txt
adblock2privoxy: easylist.txt: hGetContents: invalid argument (invalid byte sequence)

The issue seems to be occurs when non ascii characters are present in easylist, if I filter out those line with non ascii chars it works fine.

root@proxy:~/adblock_lists# cat easylist.txt|grep --color='auto' -P "[\x80-\xFF]"
at▒ a[target="_bl▒▒nk"] a[rel="nofollow"][target="_bl▒▒nk"]
at▒ > thead[target="_bl▒▒nk"][href$="?MT"]

Quick & dirty way to "fix" the issue :

 cat *.txt|grep -P -v "[\x80-\xFF]" >> full_list.filtered_txt

Change History (2)

comment:1 Changed 5 years ago by zubr

  • Owner set to zubr

comment:2 Changed 5 years ago by zubr

  • Resolution set to fixed
  • Status changed from new to closed

Could not reproduce on my machine. I think it depends on system locale. I've tried to avoid this dependency. Now the app should always use utf8.
Fixed in version 1.3.2

Note: See TracTickets for help on using tickets.