[Tutor] Unicode in List Object

Tim Golden mail at timgolden.me.uk
Mon Mar 26 15:38:00 CEST 2007


Roman Kreuzhuber wrote:

> I want to store multiple inputs from text fields in a list-object, which 
> works as a very small databank. The problem is that this data will contain 
> unicode characters 

I'm not sure why you think this is a problem. A Python list can
hold anything, including unicode objects or encoded strings. eg,

['White', u'Wei\u00df', 'Wei\xdf']

This is a list containing an entirely ASCII string,
a unicode object containing a non-ASCII character,
and the same string encoded as iso-8859-1.

Can you post some code which shows what you're trying
to do and how it's failing?

TJG


More information about the Tutor mailing list