The effects of deviations from LTE and line blanketing on stellar atmospheres in the range B5 to A5