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

I was stuck again when I actually tried printing out Korean using Python. I had to to use u’something in Korean’.

See the below example.

 params['error_email'] = u'이메일 주소를 올바르게 입력해주세요.' 

Here is another example with regex.

 USER_RE = re.compile(ur'[가-힣]+$|^[a-zA-Z]+$') 

 

Advertisements

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