Added public method applay with charset parameter