fixed encoding issue when a process had invalid characters