Re: [Tutor] unicode issue? (fwd)

2006-03-21 Thread Danny Yoo
> A friend of mine showed me where the unicode is showing up but we still > can't get script to work right. We tried encoding the appropriate > variable but it still is spitting back the error. Would I just have: > u'\u201c'.encode('utf8') in my script or should it be > md['vote-desc'][0].encode('

Re: [Tutor] unicode issue?

2006-03-21 Thread Danny Yoo
On Tue, 21 Mar 2006, Matt Dempsey wrote: > I'm having a new problem with my House vote script. It's returning the > following error: > > Traceback (most recent call last): > File "C:/Python24/evenmorevotes", line 20, in -toplevel- > f.write > (nm+'*'+pt+'*'+vt+'*'+md['vote-result'][0]+'*'+

[Tutor] unicode issue?

2006-03-21 Thread Matt Dempsey
I'm having a new problem with my House vote script. It's returning the following error: Traceback (most recent call last):  File "C:/Python24/evenmorevotes", line 20, in -toplevel-    f.write(nm+'*'+pt+'*'+vt+'*'+md['vote-result'][0]+'*'+md['vote-desc'][0]+'*'+'\n') UnicodeEncodeError: 'ascii' code