changing encoding byte sequence depending on windows type