removed cStringIO for lack of unicode support