Changing the encoding might cause some problems with older dictionary encodings. Since you already have encoded the new header, maybe we can check if the header matches in 'setDictionary'.