Added codepage support for cygwin