TomasR a écrit :
> Using the datagrid widget for a simple presentation of a table.
> Defining the fields as
> table_fields = [('Namn', 'name'),
> ('Foretag', compName),
> ('Lediga tider', freeTimes)]
> where compName and freeTimes are call to functions which pick out the
> values. This gives a simple table
>
> Namn Foretag Lediga tider
> Göran Karlsson Model Inc. 6
> Lisa Karlsson Hairdo 6
>
> The middle column heading should be "Företag",
> table_fields = [('Namn', 'name'),
> ('Företag', compName),
>
what about (u'Företag', compName),
instead, just to let python know that it is unicode and not only string...
And of course, your ö encoding should match the "# -*- coding: xxx -*-"
at the top of your .py script
> ('Lediga tider', freeTimes)]
> but then I get the following error (last line):
>
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
> 1: ordinal not in range(128)
>
>
>
> Is this an error in my use of DataGrid widget or an error in the
> DataGrid widget. It seems to be able to handle data with international
> characters but not headings.
>
>
> Yours
> Tomas
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---