More portable fix for string encoding problems