#NEWLINE# def checkForBOMs( modelXbrl , file , mappedUri , filepath , * args , **kwargs ) : #NEWLINE# #INDENT# if ( mappedUri . modelManager . validateDisclosureSystem and getattr ( modelXbrl . modelManager . validateDisclosureSystem , 'SBRNLplugin' , False ) ) : #NEWLINE# #INDENT# with open ( filepath , 'rb' ) as fb : #NEWLINE# #INDENT# startingBytes = fb . read ( 8 ) #NEWLINE# if re . match ( b'\\x00\\x00\\xFE\\xFF|\\xFF\\xFE\\x00\\x00|\\x2B\\x2F\\x76\\x38|\\x2B\\x2F\\x76\\x39|\\x2B\\x2F\\x76\\x2B|\\x2B\\x2F\\x76\\x2F|\\xDD\\x73\\x66\\x73|\\xEF\\xBB\\xBF|\\x0E\\xFE\\xFF|\\xFB\\xEE\\x28|\\xFE\\xFF|\\xFF\\xFE' , startingBytes ) : #NEWLINE# #INDENT# modelXbrl . error ( 'SBR.NL.2.1.0.09' , _ ( 'File MUST not start with a Byte Order Mark (BOM): %(filename)s' ) , modelObject = modelXbrl , filename = mappedUri ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return None