Filter: Fix encoding issue on Python 3.