Support compression of international characters

Fixes http://manage.dimagi.com/default.asp?86382#493928