Fix crash when handling headers or footers with non-ascii characters, reported by  Grzegorz Adam Hankiewicz.
Fix crash when handling headers or footers with non-ascii characters, reported by 
Grzegorz Adam Hankiewicz.



pombreda/rst2pdf,rst2pdf/rst2pdf,rst2pdf/rst2pdf,pombreda/rst2pdf,liuyi1112/rst2pdf,liuyi1112/rst2pdf