1 |
On 05/03/2015 11:25 PM, Brian Dolbec wrote: |
2 |
> Isn't this backwards from what was reported. It generated a |
3 |
> UnicodeDecodeError when using additional args to unicode(). |
4 |
|
5 |
It was actually a TypeError. |
6 |
|
7 |
> It needed |
8 |
> to convert it to string so errors= needed to not be passed in. |
9 |
|
10 |
Yeah, the first unicode call fixes that. |
11 |
|
12 |
If a UnicodeDecodeError is then raised (not a TypeError), the second |
13 |
unicode call decodes the UnicodeError.object attribute, which is |
14 |
guaranteed to be a string that can be passed to unicode using the three |
15 |
argument form. |
16 |
-- |
17 |
Thanks, |
18 |
Zac |