Other fix for character encoding

Applying the fix from the sourceforge version