remove magic space character, add encoding