Eclipse Tip 2-settings for Python character issues

Source: Internet
Author: User

1. Settings for Eclipse

(1) Window->preferences->general->editors->text editors->spelling->encoding->utf-8, editor encoding format

(2) Window->preferences->general->workspace->text file Encoding->utf-8

(3) Open the Eclipse installation directory->eclipse.ini, add "-dfile.encoding=utf-8" to the last line

2. File encoding

PY file Remember to save to UTF-8, the first line of the file plus "#coding =utf-8", this sentence can control the code can enter Chinese characters

Set when run

Run-->run Configurations->python run->common-> Encoding->utf-8, the runtime can solve the problem of Chinese garbled.

Change Blank module default display #-*-Coding:utf-8-*-

Window--preferences--pydev--editor--template--empty, then click on the "Edit" button, the default statements are removed, rewritten as: #-*-Coding:utf-8-*-such a sentence, Then you create a new blank module, and you don't need to copy that code every time.

3. Eye Protection tips:

(1) Adjust the font size: can be set by the first in Window > Preferences>general>appearance>color and Fonts, basic textfonts set size can be.

(2) Window > Preferences>general>appearance>theme set to Dark for better lighting

Eclipse Tip 2-settings for Python character issues

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.