To unicode or not to unicode

Benjamin Peterson benjamin at
Thu Feb 19 22:21:57 EST 2009

Ron Garret <rNOSPAMon <at>> writes:

> I'm writing a little wiki that I call µWiki.  That's a lowercase Greek 
> mu at the beginning (it's pronounced micro-wiki).  It's working, except 
> that I can't actually enter the name of the wiki into the wiki itself 
> because the default unicode encoding on my Python installation is 
> "ascii".  So I'm trying to decide on a course of action.  There seem to 
> be three possibilities:

You should never have to rely on the default encoding. You should explicitly
decode and encode data.

> 1.  Change the code to properly support unicode.  Preliminary 
> investigations indicate that this is going to be a colossal pain in the 
> ass.

Properly handling unicode may be painful at first, but it will surely pay off in
the future.

More information about the Python-list mailing list