We need to check the whole file.  It could be a valid UTF-8 input stream but cutting it off at the wrong place could cause it to fail because UTF-8 is a variable width character stream.  This would yield a false negative causing valid pages to not load thus dangerous to assume a fixed number of bytes to validate.  

Hopefully the extension check short-circuits large binaries before they are challenged but, either-way, the Multi-byte conversion will stop at the first invalid UTF character in the input stream so I think we're ok with passing in the entire buffer.