Fix issue where requests from unsaved files failed because the source encoding could not be determined.