Opened 4 years ago

Closed 4 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

Description

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▒he.net###between_links
flashgot.net###head a[target="_bl▒▒nk"]
flashgot.net##.content a[rel="nofollow"][target="_bl▒▒nk"]
at▒he.net##.links > thead
noscript.net##a[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 4 years ago by zubr

  • Owner set to zubr

comment:2 Changed 4 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.