Ionic-liquid-based method to determine the degree of esterification in cellulose fibers.