[twill] non-ascii data?

C. Titus Brown ctb at msu.edu
Thu Mar 12 07:24:56 PDT 2009

On Thu, Mar 12, 2009 at 10:14:23AM -0400, Chris Abraham wrote:
-> Hi,
-> I've been wondering about how to set twill variables to non-ascii  
-> values.  I have just been using just binary representations like:
-> setglobal event_name    'Flunc Test Party n ?????? N'
-> versus
-> setglobal event_name    'Flunc Test Party n \346\227\245\346\234\254 N'
-> or
-> setglobal event_name   u'Flunc Test Party n \u65e5\u672c N'
-> Doesn't the binary representation leave things open to  
-> interpretation?  I mean, how does twill know how to decode this  
-> value?  Does it assume utf-8?  Is there a way to specify what  
-> encoding a particular value is in?

Those are good questions; it just treats them as Python strings being
entered on the terminal, I think, so probably utf-8.  I must admit to
being at sea on these issues...

Would it work to allow an optional unicode encoding as the last

C. Titus Brown, ctb at msu.edu

More information about the twill mailing list