read source files using user defined encodeing, fix #496