[Tutor] unicode
Stefan Elwesthal
elwis at linuxmail.org
Mon Mar 14 11:51:50 CET 2005
Hello again!
Well, I promise this is not a bad habit of mine. I've actually bought myself a few books about the lovely snake (did I just spend a year learning Java, why's that?).
I thought I should brag a little for my fellow developer colleagues though, so i spent yetserday putting together a nice litttle Grid app using wxPython. The thing is, this little app reads records from a database using odbc.. and that's the problem.
I'm swedish, our databae is full of horrible characters with strange dots on top and Python won't have none of it. it falls apart telling me that it can't decode that sort of thingy!
So.. will I have to do some terrible magic storing all single values from the database in strings and run unicode methods on them before showing them in my wxGrid or is there a better way?
(I'm going on bragging about how little code I need to write when I'm NOT using java.. ;)
this is what I do now, i stole some example from thw web
#fill the grid with data from the database
for row in range(len(db.data)):
for col in range(len(db.data[row])):
values = db.data[row][col]
self.grid_1.SetCellValue(row, col, str(values))
any help is welcome, best regards to you all
Stefan
Sweden
--
______________________________________________
Check out the latest SMS services @ http://www.linuxmail.org
This allows you to send and receive SMS through your mailbox.
Powered by Outblaze
More information about the Tutor
mailing list