Fix encoding issue when open file not in workspace