Unicode encoding fixes