bug 50955 - incorporate info from the DocumentSummaryInformation for guessing the encoding. Back off to the old method if DocSummInfo is not available. Thanks to Andreas Beeker for recommending this direction.