Modify

Opened 16 years ago

Closed 16 years ago

#3709 closed defect (fixed)

Unicode error when performing a select on trac tables

Reported by: anonymous Owned by: James Mills
Priority: normal Component: SqlQueryMacro
Severity: normal Keywords: UnicodeEncodeError
Cc: Trac Release: 0.11

Description

Hi James,

I've got the error below when I my select returns a column with latin characteres (in this case a "ç" and "ã"). Do you have any ideas on how can I hanlde that?

Thanks in advance.

UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-8: ordinal not in range(128)

Attachments (1)

tables.py (9.7 KB) - added by eric.chaves 16 years ago.
tables.py with proper unicode value handling

Download all attachments as: .zip

Change History (2)

comment:1 Changed 16 years ago by eric.chaves

Resolution: fixed
Status: newclosed

I've got the problem. The library pymill dows not handle cells with unicode values properly. in order to fix it I've added a check on the initializion of the Cell class. If the value is an unicode string, a safe conversion is performed.

See the line 192 of the attached file.

Changed 16 years ago by eric.chaves

Attachment: tables.py added

tables.py with proper unicode value handling

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain James Mills.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.