Getting "invalid character in identifier" when working with tornado.options.parse_config_file. under windows

Today I tried to build a tornado application. The developing environment is windows. When I tried to start debugging, I got "invalid character in identifier" on tornado.options.parse_config_file("config.conf").

The problem is, under windows, utf-8 file contains BOM. The config parser reads the BOM but not recognized it.

Remove the BOM from the config file solves the problem.