Get Python to print out another language (Korean) – part 1

I was not able to get Python to print out Korean. I learned that Python uses ASCII encoding by default, and Korean cannot be read using ASCII. I just added the below code at the very beginning of the file and the problem was fixed.

# -*- coding: utf-8 -*-

The code tells Python that the Python script is encoded in utf-8

Advertisements

3 thoughts on “Get Python to print out another language (Korean) – part 1

  1. This blog giving the details of technology. This gives the details about working with the business processes and change the way. Here explains think different and work different then provide the better output. Thanks for this blog.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s