now using slice! to remove the BOM character (when it exists), rather
than scanning the whole content (string) for the BOM character