python snippet how to add encoding declare

I use KNIME python snippet to execute python code to process Chinese text, but it warns me there are non ascii characters but no encoding declared.

I execute python code in python IDLE on my computer, it performed perfect~Because I add "# -*- coding: gbk -*-" at the first line of the code.

I copy this code to python snippet, but it doesn't work.

How can I solve this problem?