Actually, that doesn't work either.

This stuff has always blown my mind a bit:
  >>> s = 'La Pe\xf1a'
  >>> print s
  La Pe±a
  >>> s.encode('utf8')
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position
5: ordinal not in range(128)
  >>> s.encode('utf8','ignore')
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position
5: ordinal not in range(128)
  >>> s.encode('utf8','replace')
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position
5: ordinal not in range(128)
  >>> u = unicode(s, 'utf8')
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "C:\Python25\lib\encodings\utf_8.py", line 16, in decode
      return codecs.utf_8_decode(input, errors, True)
  UnicodeDecodeError: 'utf8' codec can't decode bytes in position 5-6:
unexpected end of data
  >>> u = unicode(s, 'utf8', 'ignore')
  >>> u
  u'La Pe'
  >>> u = unicode(s, 'utf8', 'replace')
  >>> u
  u'La Pe\ufffd'
  >>>

I don't know the best final result for the upload would be.

Pv

On Feb 25, 12:48 pm, Pv <p...@swooby.com> wrote:
> It should have been:
>         return content_type, content.encode('utf-8', 'ignore')
>
> Pv
>
> On Feb 25, 12:43 pm, Pv <p...@swooby.com> wrote:
>
>
>
> > Yes, I just commented that out and the upload was successful.
>
> > Pv
>
> > On Feb 25, 12:25 pm, "Thilo-Alexander Ginkel" <th...@ginkel.com>
> > wrote:
>
> > > On Thursday 25 February 2010 01:55:42 Pv wrote:
>
> > > > I am pretty sure this aborts in RBTools itself before it ever gets to
> > > > the server.
> > > > Again, a manual upload of the diff file to the server works fine.
>
> > > Couldhttp://reviews.reviewboard.org/r/1298/havecausedthis?
>
> > > Regards,
> > > Thilo

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to