Re: [python-win32] Python/ASP Request data with non ascii characters

2006-07-05 Thread Emlyn Jones
On Tuesday 04 Jul 2006 04:07, you wrote: > > Hi Mark, thanks for the reply. The attribute you where > > thinking off is `Item`. > > What I'll need to work out now is which code page has been used to > > encode that Unicode string. > > I'm not sure that is relevant. If I understand correctly, the c

Re: [python-win32] Python/ASP Request data with non ascii characters

2006-07-03 Thread Mark Hammond
> Hi Mark, thanks for the reply. The attribute you where > thinking off is `Item`. > What I'll need to work out now is which code page has been used to > encode that Unicode string. I'm not sure that is relevant. If I understand correctly, the code-page is only used when converting from a string

Re: [python-win32] Python/ASP Request data with non ascii characters

2006-07-03 Thread Emlyn Jones
On 7/1/06, Mark Hammond <[EMAIL PROTECTED]> wrote: > > I thought I would be able to do > > > > my_string = unicode(Request("formstring"),"ISO-8859-1")> > > > But i get: > > coercing to Unicode: need string or buffer, instance found. > > I'm guessing (and I mean guessing) this is because the CDispat

Re: [python-win32] Python/ASP Request data with non ascii characters

2006-06-30 Thread Mark Hammond
> I thought I would be able to do > > my_string = unicode(Request("formstring"),"ISO-8859-1") > > But i get: > coercing to Unicode: need string or buffer, instance found. > I'm guessing (and I mean guessing) this is because the CDispatch > object doesn't have a __unicode__ function. A __unicode__

[python-win32] Python/ASP Request data with non ascii characters

2006-06-30 Thread Emlyn Jones
Hello, I've just run into a snag and I'm wondering if anybody might be able to point me towards a solution. Normally, I get data from a submitted form like this: my_string = str(Request("formstring")) which is great until formstring contains a non ascii character. When it does I get a UnicodeEnco