Issue with Windows-1250 encoding and reading file into UTF (BOM issue)

Code that finds BOM in file that is treated as UTF but characters are encoded into windows-1250. Issue occured on Polish system. that have a BOM sequence at the begining: 

10F BB 17C