Attempts to identify file encoding, falling back to UTF-8 as the default. Detection uses a BOM if present, otherwise attempts to use heuristics (English/European based) to determine encoding.