Utf8 support

Hi Keith,

I started using your integrating package, thanks for publishing it.
As I'm using utf8 encoded strings It was easy to spot the bug on it.
Please merge it in so other ppl could use it.

I planning to use it with latest mantis and web2project so more pull request might be expected.
Have a good day,
Chris