encode middleware errors with utf8 otherwise this might raise exception on non-ascii languages
Authored by: zippybr 2012-01-10
Parent: [r9488]
Child: [r9490]