[Buildbot-devel] utf-8 woes

Andy Howell AndyHowell at austin.rr.com
Sat Jul 31 11:27:49 UTC 2010


Marcus,

The offending characters are left and right single quotes, E2 80 98, and E2 80 99. Why GCC
is using these I don't know.

00000a60  65 6e 74 2e 63 70 70 3a  38 3a 20 65 72 72 6f 72  |ent.cpp:8: error|
00000a70  3a 20 e2 80 98 64 64 64  64 64 64 72 72 34 e2 80  |: ...ddddddrr4..|
00000a80  99 20 64 6f 65 73 20 6e  6f 74 20 6e 61 6d 65 20  |. does not name |

It seems that the MailNotifier class in buildbot/status/base.py defaults to utf-8
encoding. Hopefully a little sleep will better my chances of understanding python's
unicode handling :)

Thanks,

	Andy

On 07/31/2010 03:13 AM, Marcus Lindblom wrote:
> 0xe2 = 226 dec. It is not the \n sign. It's somewhere in the 'text' 
> object (at byte 54-55 I'd guess).
> 
> Printing 'text' to log/stdout and tying to locate the source of the 
> offending character would help you track down the bug.
> 
> (It might be a BB bug, as unicode-ness is relatively new.)
> 
> cheers,
> /Marcus
> 
> On 2010-07-31 09:11, Andy Howell wrote:
>>
>> I'm trying to make an html message formatter along the lines of the one in the docs. I've
>> got it working for the most part. One builder is returning back utf-8 encoded logs that
>> are causing the formatter to raise an exception when it sets the 'body' in the return dict:
>>
>>           return {
>>               'body': "\n".join(text),
>>               'type': 'html'
>>               }
>>
>> exception.UnicodeDecoderError: 'ascii' codec cant decode byte 0xe2 in position 55: ordinal
>> not in range(128)
>>
>> I tried making the \n unicode: u"\n", but that makes no difference. Ideas?
>>
>> Thanks
>>
>> 	Andy
>>
>>
>> ------------------------------------------------------------------------------
>> The Palm PDK Hot Apps Program offers developers who use the
>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>> of $1 Million in cash or HP Products. Visit us here for more details:
>> http://p.sf.net/sfu/dev2dev-palm
> 
> 
> 
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
> 





More information about the devel mailing list