store encoding for mime-type once it has been determined (cherry picked from commit 6f55571dde0739ce76dca736bce920b72d901613)
store encoding for mime-type once it has been determined
(cherry picked from commit 6f55571dde0739ce76dca736bce920b72d901613)

MindTouch/DReAM,PeteE/DReAM,sdether/DReAM,yurigorokhov/DReAM,bjorg/DReAM