cp1251 fix and offset fix