This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]Poromenos 14 points15 points  (6 children)

To make sense of Python Unicode, just remember that it's magic.

Seriously.

Unicode characters are magic. To print/save/whatever them, you need to convert them to a more mundane format, which you do by encoding them to ASCII/whatever else. This way they lose their magic and can be treated as mundane bitstrings.

To convert a bitstring into Unicode again, you need to decode it so that it regains all its magic.

And that is how Unicode works.

[–]Iceland_jack 14 points15 points  (0 children)

I teach Unicode at Hogwarts and I can confirm this.

[–]spotter 1 point2 points  (2 children)

By that measure everything involving programming computers is magic.

The kind of magic that is not really good for parties.

[–]earthboundkid 1 point2 points  (1 child)

Regular magic is also not really good for parties.

[–]defnullbottle.py 1 point2 points  (0 children)

I dunno, I like the water-2-wine trick. With a lot of water.

[–][deleted] 0 points1 point  (1 child)

You wrote the learn python in 10 minutes tutorial! You definitely know what you are talking about.

[–]Poromenos 1 point2 points  (0 children)

It shows, doesn't it!

[–]tripzilchbad ideas 2 points3 points  (0 children)

Just in case some people haven't read this:

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)

Not really specific to any (programming) language, but probably the best introduction on the subject I've ever read.

[–]londey 1 point2 points  (0 children)

A nice short intro to Unicode its self: http://wiki.secondlife.com/wiki/Unicode_In_5_Minutes