It's hard to get an eclipse + pydev High. The tragedy is that when there is a Chinese string, the wildcard is prone to syntaxerror: Non-ASCII character. Okay. Solve this annoying problem.
Add #-*-coding: UTF-8-*-or: # Coding = UTF-8 at the beginning of each code file PS: If you want to be lazy and do not want to add the above line to every new file You can choose Window> preferences> pydev> editor> templates. Select <empty> on the right, click Edit, and then add the above line to add the new line. (You can also create a new one, but you must select the one you created instead of the default empty when creating the module) Compile again... Finally there is no such error prompt... But... Chinese cannot be output normally. Good Let's change the eclipse Window-> preferences-> General-> workspace, find "text file encoding", select other, select "UTF-8" OK Then compile... Everything is normal . |