extract encoding settings into separate file