[reportlab-users] V2 bullet

Mike Dewhirst miked at dewhirst.com.au
Mon Jul 24 07:57:03 EDT 2006


Mike Dewhirst wrote:
> Robin Becker wrote:
>> Mike Dewhirst wrote:
>>> I just upgraded from ReportLab version 1.2 to 2.0 and my tests fail 
>>> in one place only. Here is the last bit of traceback ...
>>>
>>>   File "C:\usr\bin\lib\encodings\utf_8.py", line 16, in decode
>>>     return codecs.utf_8_decode(input, errors, True)
>>> UnicodeDecodeError: 'utf8' codec can't decode byte 0xb7 in position 
>>> 0: unexpected code byte
>>>
>>> Here is the problem ...
>>>
>>>     self.bullet_char = chr(183) #'*'
>>>
>>> If I swap an asterisk for the chr(183) my tests all work again.
>>>

<snip>

>>
>> Try replacing with '\xc2\xb7' and see if that is the right bullet.
> 
> Robin
> 
> The tests are all passing now. For my next trick I'll install v2 on the 
> live site and and give it a whirl. Might take me a while.

Robin

Now that le Tour is finished, V2 is running painlessly for me everywhere 
- thank you one and all.

My next question is - where do I read up more on your 'Try replacing 
with '\xc2\xb7' and see ...'?

Prof Google led me up many dark and twisty alleys and that led me to 
think I'm not really sure I want to allocate brain space to the innards 
of unicode. But I do want to be able translate various symbols in 
various to codes which I then want to make Python emit.

Can you suggest any links or directions to reading matter for people (ie 
me) with short attention spans?

If not, I'll settle for dark and twisty stuff :)

Thanks

mike




> 
> Thanks heaps
> 
> Mike
> 
> 
> 
>>
>>
> 
> 



More information about the reportlab-users mailing list