Use notepad++ to learn Python crawler, print page Chinese garbled problem

Source: Internet
Author: User

Today learning to use Python crawler when found to crawl the page Chinese will be garbled, has been online search solutions, a test past, found or garbled, and then I began to use other methods of testing, with Python's own editor Open is normal, found to be notepad++ The problem with this editor, I changed the encoding method for utf-8 without BOM, tried all settings, no use, new, open file default is always ANSI format, PYNPP this quick open. py Format plug-in operation has been garbled, although did not find the root cause of the problem, but know that the code is not a problem, mainly the editor has some small problems

But hundred spent after found that if it is garbled problem, the simplest is the beginning of the file to join #coding=utf-8, basically can solve garbled problem

The first blog, do not know how to write well, for the moment to record their own learning to think it, hope that after a period of time can be improved, say to themselves refueling.

 

Use notepad++ to learn Python crawler, print page Chinese garbled problem

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.