About UTF character codes

Source: Internet
Author: User

About UTF character codes


In the ex9.py, because the colleague is studying the ESPAOL, then installed, changed the week and the month to Spanish. The results are not displayed, and then the #-*-Coding:utf-8-*-conversion is added, and the display can be run, but the é shows garbled characters. Change to utf-16 or 32.


Code:


#-*-Coding:utf-8-*-

#here ' s Some new strange stuff, remember type it exactly.


Days = "Lunes martes miércoles jueves viernes Sábado Domingo"

months = "\nenero\nfebrero\nmarzo\nabril\nmayo\njunio\njulio\nagosto\nseptiembre\noctubre\nnoviembre\ndiciembre"


Print "Here is the days:"

Print "Here is the months:", months


Print "" "

There ' s something going on here.

With the three double-quotes.

We are able to type as much as we do.

Even 4 lines if we want,or 5, or 6.

"""





So, for Latin characters, such as e such English is not how normal display it?

Or add a%r conversion line?

Try it next time.












About UTF character codes

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.